jzpeng commited on
Commit
64b9c43
·
verified ·
1 Parent(s): 4ff8e31

Add TsFile (converted from devikaskumar/test_v4l2_fix)

Browse files
.gitattributes CHANGED
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ devikaskumar_test_v4l2_fix.tsfile filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,116 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ task_categories:
4
+ - robotics
5
+ tags:
6
+ - tsfile
7
+ - timeseries
8
+ - tabular
9
+ - lerobot
10
+ modality:
11
+ - timeseries
12
+ - tabular
13
+ pretty_name: devikaskumar test_v4l2_fix TsFile
14
+ size_categories:
15
+ - 10K<n<100K
16
+ configs:
17
+ - config_name: default
18
+ data_files:
19
+ - split: train
20
+ path: data/devikaskumar_test_v4l2_fix.tsfile
21
  ---
22
+
23
+ # devikaskumar/test_v4l2_fix (TsFile)
24
+
25
+ This repository is an Apache TsFile conversion of the LeRobot dataset
26
+ [`devikaskumar/test_v4l2_fix`](https://huggingface.co/datasets/devikaskumar/test_v4l2_fix).
27
+
28
+ Modalities: Time-series, tabular.
29
+
30
+ ## Source dataset
31
+
32
+ - **Author:** `devikaskumar`
33
+ - **License:** Apache-2.0
34
+ - **Robot type:** `so101_follower`
35
+ - **LeRobot codebase:** `v2.1`
36
+ - **Task:** `test` (one task, `task_index=0`)
37
+ - **Split:** `train` (`0:52` in the source metadata)
38
+ - **Scale:** 52 episodes, 15,702 frames, one chunk, 30 fps
39
+ - **Source frame files:** `data/chunk-{episode_chunk:03d}/episode_{episode_index:06d}.parquet`
40
+
41
+ The original dataset contains 104 camera videos (two streams per episode). The
42
+ videos are not copied into this TsFile dataset. They remain available in the
43
+ source repository under
44
+ [`videos/`](https://huggingface.co/datasets/devikaskumar/test_v4l2_fix/tree/main/videos),
45
+ with files at
46
+ `videos/chunk-{episode_chunk:03d}/{video_key}/episode_{episode_index:06d}.mp4`.
47
+ The two source video features are `observation.images.webcam` and
48
+ `observation.images.realsense`; both are 480×640 RGB, AV1, 30 fps, with no audio.
49
+
50
+ ## Converted files
51
+
52
+ - **TsFile:** `data/devikaskumar_test_v4l2_fix.tsfile`
53
+ - **Table:** `devikaskumar_test_v4l2_fix`
54
+ - **Rows:** 15,702
55
+ - **Devices:** 52 episode/task tag combinations
56
+ - **TsFile size:** approximately 386 KB (the source Parquet shards total approximately 913 KB)
57
+ - **Metadata:** `meta/` is retained from the source; `meta/info.json` describes
58
+ the converted TsFile and records the source/video mapping in
59
+ `tsfile_conversion`.
60
+
61
+ ## Schema
62
+
63
+ `Time` is `round(timestamp * 1000)` in milliseconds and restarts at zero for
64
+ each episode. The redundant source `timestamp` field is dropped.
65
+
66
+ TAG columns (the TsFile table/device dimensions):
67
+
68
+ - `episode_index` (`INT64` source value, stored as a TAG)
69
+ - `task_index` (`INT64` source value, stored as a TAG)
70
+
71
+ FIELD columns:
72
+
73
+ - `frame_index` (`INT64`)
74
+ - `sample_index` (`INT64`), renamed from source `index`
75
+ - `action_0` … `action_5` (`FLOAT`), flattened from `action[6]`
76
+ - `observation_state_0` … `observation_state_5` (`FLOAT`), flattened from
77
+ `observation.state[6]` (`.` becomes `_`)
78
+
79
+ ## Conversion and compression
80
+
81
+ The generic LeRobot converter was run in merged mode, so all source episode
82
+ shards are stored in one table-model TsFile. Query an episode by filtering the
83
+ `episode_index` and `task_index` TAG columns. Numeric encoding follows the
84
+ compact profile requested for this conversion: FLOAT/DOUBLE use `GORILLA`,
85
+ INT32/INT64 and `Time` use `TS_2DIFF`, and physical columns use `LZ4`.
86
+
87
+ No source rows or numeric fields are intentionally removed except the redundant
88
+ `timestamp` field. The video fields are omitted from TsFile because videos are
89
+ external binary streams; their source paths and frame alignment metadata are
90
+ recorded in `meta/info.json`.
91
+
92
+ ## Validation
93
+
94
+ The generated TsFile was opened and queried with the Apache TsFile Python SDK.
95
+ The authoritative TsFile metadata row count and staged Parquet row count both
96
+ equal **15,702**; query readback also returned 15,702 rows across 52 devices.
97
+
98
+ ## Usage
99
+
100
+ ```python
101
+ from tsfile import TsFileReader
102
+
103
+ path = "data/devikaskumar_test_v4l2_fix.tsfile"
104
+ reader = TsFileReader(path)
105
+ table = reader.get_all_table_schemas()["devikaskumar_test_v4l2_fix"]
106
+ columns = [
107
+ c.get_column_name()
108
+ for c in table.get_columns()
109
+ if c.get_column_name() != "Time"
110
+ ]
111
+
112
+ with reader.query_table(
113
+ "devikaskumar_test_v4l2_fix", columns, batch_size=65536
114
+ ) as result:
115
+ batch = result.read_arrow_batch()
116
+ ```
devikaskumar_test_v4l2_fix.tsfile ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d88ba4b5aa564070c9c62f66465cbd3fc9d02c5bfb359286d550ab5bcd79e7df
3
+ size 386372
devikaskumar_test_v4l2_fix.yaml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Conversion configuration for devikaskumar/test_v4l2_fix.
2
+ hf_source: "devikaskumar/test_v4l2_fix"
3
+ subset: null
4
+ split: "train"
5
+ revision: null
6
+ source_pattern:
7
+ - "data/chunk-*/*.parquet"
8
+ - "meta/*"
9
+ - "README.md"
10
+
11
+ target_name: "devikaskumar_test_v4l2_fix"
12
+
13
+ conversion:
14
+ mode: "script"
15
+ converter: "lerobot"
16
+ input_format: "parquet"
17
+ time_column: null
18
+ time_precision: "ms"
19
+ tag_columns:
20
+ - "episode_index"
21
+ - "task_index"
22
+ rename: {}
23
+ drop: []
24
+ script_params:
25
+ granularity: "merged"
26
+ table_name: "devikaskumar_test_v4l2_fix"
27
+ tsfile_writer: "python"
28
+ time_source: "timestamp"
29
+ fps: 30
30
+
31
+ upload:
32
+ mode: "single"
33
+ repo_id: "jzpeng/devikaskumar_test_v4l2_fix"
34
+
35
+ attribution:
36
+ original_url: "https://huggingface.co/datasets/devikaskumar/test_v4l2_fix"
37
+ paper: null
38
+ license: "apache-2.0"
39
+ authors: "devikaskumar"
40
+ notes: |
41
+ The source LeRobot dataset contains 52 episodes and 15,702 frames at 30 fps.
42
+ Source videos are available at the original repository's videos tree and are
43
+ intentionally not copied into the TsFile repository.
meta/episodes.jsonl ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"episode_index": 0, "tasks": ["test"], "length": 371}
2
+ {"episode_index": 1, "tasks": ["test"], "length": 313}
3
+ {"episode_index": 2, "tasks": ["test"], "length": 329}
4
+ {"episode_index": 3, "tasks": ["test"], "length": 338}
5
+ {"episode_index": 4, "tasks": ["test"], "length": 324}
6
+ {"episode_index": 5, "tasks": ["test"], "length": 303}
7
+ {"episode_index": 6, "tasks": ["test"], "length": 326}
8
+ {"episode_index": 7, "tasks": ["test"], "length": 277}
9
+ {"episode_index": 8, "tasks": ["test"], "length": 293}
10
+ {"episode_index": 9, "tasks": ["test"], "length": 284}
11
+ {"episode_index": 10, "tasks": ["test"], "length": 308}
12
+ {"episode_index": 11, "tasks": ["test"], "length": 297}
13
+ {"episode_index": 12, "tasks": ["test"], "length": 302}
14
+ {"episode_index": 13, "tasks": ["test"], "length": 280}
15
+ {"episode_index": 14, "tasks": ["test"], "length": 323}
16
+ {"episode_index": 15, "tasks": ["test"], "length": 334}
17
+ {"episode_index": 16, "tasks": ["test"], "length": 359}
18
+ {"episode_index": 17, "tasks": ["test"], "length": 290}
19
+ {"episode_index": 18, "tasks": ["test"], "length": 309}
20
+ {"episode_index": 19, "tasks": ["test"], "length": 323}
21
+ {"episode_index": 20, "tasks": ["test"], "length": 296}
22
+ {"episode_index": 21, "tasks": ["test"], "length": 343}
23
+ {"episode_index": 22, "tasks": ["test"], "length": 292}
24
+ {"episode_index": 23, "tasks": ["test"], "length": 278}
25
+ {"episode_index": 24, "tasks": ["test"], "length": 347}
26
+ {"episode_index": 25, "tasks": ["test"], "length": 328}
27
+ {"episode_index": 26, "tasks": ["test"], "length": 298}
28
+ {"episode_index": 27, "tasks": ["test"], "length": 261}
29
+ {"episode_index": 28, "tasks": ["test"], "length": 326}
30
+ {"episode_index": 29, "tasks": ["test"], "length": 324}
31
+ {"episode_index": 30, "tasks": ["test"], "length": 290}
32
+ {"episode_index": 31, "tasks": ["test"], "length": 299}
33
+ {"episode_index": 32, "tasks": ["test"], "length": 275}
34
+ {"episode_index": 33, "tasks": ["test"], "length": 281}
35
+ {"episode_index": 34, "tasks": ["test"], "length": 289}
36
+ {"episode_index": 35, "tasks": ["test"], "length": 323}
37
+ {"episode_index": 36, "tasks": ["test"], "length": 282}
38
+ {"episode_index": 37, "tasks": ["test"], "length": 262}
39
+ {"episode_index": 38, "tasks": ["test"], "length": 285}
40
+ {"episode_index": 39, "tasks": ["test"], "length": 305}
41
+ {"episode_index": 40, "tasks": ["test"], "length": 311}
42
+ {"episode_index": 41, "tasks": ["test"], "length": 284}
43
+ {"episode_index": 42, "tasks": ["test"], "length": 315}
44
+ {"episode_index": 43, "tasks": ["test"], "length": 315}
45
+ {"episode_index": 44, "tasks": ["test"], "length": 336}
46
+ {"episode_index": 45, "tasks": ["test"], "length": 306}
47
+ {"episode_index": 46, "tasks": ["test"], "length": 289}
48
+ {"episode_index": 47, "tasks": ["test"], "length": 275}
49
+ {"episode_index": 48, "tasks": ["test"], "length": 272}
50
+ {"episode_index": 49, "tasks": ["test"], "length": 315}
51
+ {"episode_index": 50, "tasks": ["test"], "length": 315}
52
+ {"episode_index": 51, "tasks": ["test"], "length": 102}
meta/episodes_stats.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
meta/info.json ADDED
@@ -0,0 +1,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "codebase_version": "v2.1",
3
+ "robot_type": "so101_follower",
4
+ "total_episodes": 52,
5
+ "total_frames": 15702,
6
+ "total_tasks": 1,
7
+ "total_videos": 104,
8
+ "total_chunks": 1,
9
+ "chunks_size": 1000,
10
+ "fps": 30,
11
+ "splits": {
12
+ "train": "0:52"
13
+ },
14
+ "data_path": "data/devikaskumar_test_v4l2_fix.tsfile",
15
+ "features": {
16
+ "Time": {
17
+ "dtype": "int64",
18
+ "shape": [
19
+ 1
20
+ ],
21
+ "tsfile_role": "TIME",
22
+ "unit": "ms"
23
+ },
24
+ "episode_index": {
25
+ "dtype": "int64",
26
+ "shape": [
27
+ 1
28
+ ],
29
+ "tsfile_role": "TAG"
30
+ },
31
+ "task_index": {
32
+ "dtype": "int64",
33
+ "shape": [
34
+ 1
35
+ ],
36
+ "tsfile_role": "TAG"
37
+ },
38
+ "frame_index": {
39
+ "dtype": "int64",
40
+ "shape": [
41
+ 1
42
+ ],
43
+ "tsfile_role": "FIELD"
44
+ },
45
+ "sample_index": {
46
+ "dtype": "int64",
47
+ "shape": [
48
+ 1
49
+ ],
50
+ "tsfile_role": "FIELD"
51
+ },
52
+ "action_0": {
53
+ "dtype": "float32",
54
+ "shape": [
55
+ 1
56
+ ],
57
+ "tsfile_role": "FIELD"
58
+ },
59
+ "action_1": {
60
+ "dtype": "float32",
61
+ "shape": [
62
+ 1
63
+ ],
64
+ "tsfile_role": "FIELD"
65
+ },
66
+ "action_2": {
67
+ "dtype": "float32",
68
+ "shape": [
69
+ 1
70
+ ],
71
+ "tsfile_role": "FIELD"
72
+ },
73
+ "action_3": {
74
+ "dtype": "float32",
75
+ "shape": [
76
+ 1
77
+ ],
78
+ "tsfile_role": "FIELD"
79
+ },
80
+ "action_4": {
81
+ "dtype": "float32",
82
+ "shape": [
83
+ 1
84
+ ],
85
+ "tsfile_role": "FIELD"
86
+ },
87
+ "action_5": {
88
+ "dtype": "float32",
89
+ "shape": [
90
+ 1
91
+ ],
92
+ "tsfile_role": "FIELD"
93
+ },
94
+ "observation_state_0": {
95
+ "dtype": "float32",
96
+ "shape": [
97
+ 1
98
+ ],
99
+ "tsfile_role": "FIELD"
100
+ },
101
+ "observation_state_1": {
102
+ "dtype": "float32",
103
+ "shape": [
104
+ 1
105
+ ],
106
+ "tsfile_role": "FIELD"
107
+ },
108
+ "observation_state_2": {
109
+ "dtype": "float32",
110
+ "shape": [
111
+ 1
112
+ ],
113
+ "tsfile_role": "FIELD"
114
+ },
115
+ "observation_state_3": {
116
+ "dtype": "float32",
117
+ "shape": [
118
+ 1
119
+ ],
120
+ "tsfile_role": "FIELD"
121
+ },
122
+ "observation_state_4": {
123
+ "dtype": "float32",
124
+ "shape": [
125
+ 1
126
+ ],
127
+ "tsfile_role": "FIELD"
128
+ },
129
+ "observation_state_5": {
130
+ "dtype": "float32",
131
+ "shape": [
132
+ 1
133
+ ],
134
+ "tsfile_role": "FIELD"
135
+ }
136
+ },
137
+ "video_path_original": "videos/chunk-{episode_chunk:03d}/{video_key}/episode_{episode_index:06d}.mp4",
138
+ "tsfile_conversion": {
139
+ "source_dataset": "devikaskumar/test_v4l2_fix",
140
+ "source_data_path": "data/chunk-{episode_chunk:03d}/episode_{episode_index:06d}.parquet",
141
+ "converted_data_path": "data/devikaskumar_test_v4l2_fix.tsfile",
142
+ "table_name": "devikaskumar_test_v4l2_fix",
143
+ "granularity": "merged",
144
+ "time_precision": "ms",
145
+ "time_mapping": {
146
+ "source": "timestamp",
147
+ "fps": 30,
148
+ "unit": "milliseconds"
149
+ },
150
+ "tag_columns": [
151
+ "episode_index",
152
+ "task_index"
153
+ ],
154
+ "row_count": 15702,
155
+ "feature_source": "features describe the converted TsFile schema",
156
+ "flattened_features": {
157
+ "action": [
158
+ "action_0",
159
+ "action_1",
160
+ "action_2",
161
+ "action_3",
162
+ "action_4",
163
+ "action_5"
164
+ ],
165
+ "observation.state": [
166
+ "observation_state_0",
167
+ "observation_state_1",
168
+ "observation_state_2",
169
+ "observation_state_3",
170
+ "observation_state_4",
171
+ "observation_state_5"
172
+ ]
173
+ },
174
+ "renamed_features": {
175
+ "index": "sample_index"
176
+ },
177
+ "dropped_features": [
178
+ "timestamp"
179
+ ],
180
+ "omitted_features": [
181
+ "observation.images.webcam",
182
+ "observation.images.realsense"
183
+ ],
184
+ "original_video_path": "videos/chunk-{episode_chunk:03d}/{video_key}/episode_{episode_index:06d}.mp4",
185
+ "original_video_features": {
186
+ "observation.images.webcam": {
187
+ "dtype": "video",
188
+ "shape": [
189
+ 480,
190
+ 640,
191
+ 3
192
+ ],
193
+ "names": [
194
+ "height",
195
+ "width",
196
+ "channels"
197
+ ],
198
+ "info": {
199
+ "video.height": 480,
200
+ "video.width": 640,
201
+ "video.codec": "av1",
202
+ "video.pix_fmt": "yuv420p",
203
+ "video.is_depth_map": false,
204
+ "video.fps": 30,
205
+ "video.channels": 3,
206
+ "has_audio": false
207
+ }
208
+ },
209
+ "observation.images.realsense": {
210
+ "dtype": "video",
211
+ "shape": [
212
+ 480,
213
+ 640,
214
+ 3
215
+ ],
216
+ "names": [
217
+ "height",
218
+ "width",
219
+ "channels"
220
+ ],
221
+ "info": {
222
+ "video.height": 480,
223
+ "video.width": 640,
224
+ "video.codec": "av1",
225
+ "video.pix_fmt": "yuv420p",
226
+ "video.is_depth_map": false,
227
+ "video.fps": 30,
228
+ "video.channels": 3,
229
+ "has_audio": false
230
+ }
231
+ }
232
+ },
233
+ "original_video_source": "https://huggingface.co/datasets/devikaskumar/test_v4l2_fix/tree/main/videos",
234
+ "video_policy": "Videos are not uploaded to this repository; use the original HuggingFace dataset videos."
235
+ }
236
+ }
meta/tasks.jsonl ADDED
@@ -0,0 +1 @@
 
 
1
+ {"task_index": 0, "task": "test"}