Add TsFile conversion for Vacuame/train4

#1
by THUgewu - opened
Files changed (3) hide show
  1. README.md +118 -109
  2. data/vacuame_train4.tsfile +0 -0
  3. meta/info.json +181 -93
README.md CHANGED
@@ -1,109 +1,118 @@
1
- ---
2
- license: other
3
- language:
4
- - en
5
- pretty_name: Vacuame/train4 (LeRobot SO-100) - TsFile
6
- tags:
7
- - time-series
8
- - tsfile
9
- - robotics
10
- - lerobot
11
- - so100
12
- - manipulation
13
- - timeseries
14
- task_categories:
15
- - time-series-forecasting
16
- - robotics
17
- ---
18
-
19
- # Vacuame/train4 (LeRobot SO-100) - TsFile
20
-
21
- This dataset converts the numeric time-series from [`Vacuame/train4`](https://huggingface.co/datasets/Vacuame/train4) to Apache TsFile while preserving the LeRobot episode-level layout.
22
-
23
- ## Repository Layout
24
-
25
- ```text
26
- README.md
27
- data/chunk-000/episode_000000.tsfile
28
- data/chunk-000/episode_000001.tsfile
29
- meta/info.json
30
- meta/tasks.jsonl
31
- meta/episodes.jsonl
32
- meta/stats.json
33
- videos/chunk-000/observation.images.laptop/episode_000000.mp4
34
- videos/chunk-000/observation.images.laptop/episode_000001.mp4
35
- videos/chunk-000/observation.images.phone/episode_000000.mp4
36
- videos/chunk-000/observation.images.phone/episode_000001.mp4
37
- ```
38
-
39
- ## Source Dataset
40
-
41
- - Source: [`Vacuame/train4`](https://huggingface.co/datasets/Vacuame/train4)
42
- - LeRobot version: v2.0
43
- - Robot type: `so100`
44
- - Episodes: 2
45
- - Frames: 119
46
- - FPS: 30
47
- - Task: `try`
48
- - Video streams: `observation.images.laptop`, `observation.images.phone`
49
-
50
- The original source data is one Parquet file per episode:
51
-
52
- ```text
53
- data/chunk-000/episode_000000.parquet
54
- data/chunk-000/episode_000001.parquet
55
- ```
56
-
57
- The converted data keeps the same episode granularity:
58
-
59
- ```text
60
- data/chunk-000/episode_000000.tsfile
61
- data/chunk-000/episode_000001.tsfile
62
- ```
63
-
64
- ## TsFile Mapping
65
-
66
- - Table name: `vacuame_train4`
67
- - TAG columns: `episode_id`, `task_id`
68
- - Time precision: milliseconds
69
- - Time definition: `round(frame_index * 1000 / 30)`
70
- - `timestamp` is preserved as `episode_timestamp_s`
71
- - `index` is renamed to `sample_index`
72
- - `observation.state[6]` is flattened to `state_0` ... `state_5`
73
- - `action[6]` is flattened to `action_0` ... `action_5`
74
- - Row count preserved: 119 source rows -> 119 TsFile rows across 2 files
75
-
76
- ## Video Alignment
77
-
78
- Videos are not stored inside TsFile. They are mirrored under `videos/` and aligned by episode and frame:
79
-
80
- ```text
81
- data/chunk-000/episode_000000.tsfile
82
- videos/chunk-000/observation.images.laptop/episode_000000.mp4
83
- videos/chunk-000/observation.images.phone/episode_000000.mp4
84
- ```
85
-
86
- Within an episode, `frame_index` aligns with the video frame index, and `episode_timestamp_s` aligns with video time in seconds.
87
-
88
- ## Metadata
89
-
90
- `meta/info.json` has been updated so:
91
-
92
- ```json
93
- "data_path": "data/chunk-{episode_chunk:03d}/episode_{episode_index:06d}.tsfile"
94
- ```
95
-
96
- It also includes a `tsfile_conversion` object documenting the source path, converted path, TAG columns, time mapping, row count, and vector flattening.
97
-
98
- ## Citation
99
-
100
- ```bibtex
101
- @misc{vacuame_train4,
102
- title = {train4 (LeRobot SO-100)},
103
- author = {Vacuame},
104
- url = {https://huggingface.co/datasets/Vacuame/train4},
105
- publisher = {Hugging Face}
106
- }
107
- ```
108
-
109
- The source HuggingFace dataset does not declare an explicit license.
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ pretty_name: "Vacuame/train4 (LeRobot SO-100) - TsFile"
5
+ tags:
6
+ - time-series
7
+ - tsfile
8
+ - robotics
9
+ - lerobot
10
+ - so100
11
+ - manipulation
12
+ modality: timeseries
13
+ task_categories:
14
+ - robotics
15
+ configs:
16
+ - config_name: default
17
+ data_files:
18
+ - split: train
19
+ path: data/vacuame_train4.tsfile
20
+ ---
21
+
22
+ # Vacuame/train4 (LeRobot SO-100) - TsFile
23
+
24
+ This dataset converts the numeric frame time-series from
25
+ [`Vacuame/train4`](https://huggingface.co/datasets/Vacuame/train4) to Apache
26
+ TsFile format.
27
+
28
+ Modalities: Time-series. The original camera videos are not included in this
29
+ converted repository; they remain in the source Hugging Face dataset.
30
+
31
+ ## Source Dataset
32
+
33
+ - Original dataset: [`Vacuame/train4`](https://huggingface.co/datasets/Vacuame/train4)
34
+ - LeRobot version: v2.0
35
+ - Robot type: `so100`
36
+ - Scale: 2 episodes, 119 frames, 1 task (`try`)
37
+ - Sampling rate: 30 fps
38
+ - Source frame data: `data/chunk-000/episode_000000.parquet` and
39
+ `data/chunk-000/episode_000001.parquet`
40
+ - Source videos: 2 camera streams, `observation.images.laptop` and
41
+ `observation.images.phone`, available in the source dataset
42
+ [`videos/`](https://huggingface.co/datasets/Vacuame/train4/tree/main/videos)
43
+ tree
44
+ - License: the source dataset does not declare an explicit license
45
+
46
+ ## Converted Layout
47
+
48
+ ```text
49
+ README.md
50
+ data/vacuame_train4.tsfile
51
+ meta/info.json
52
+ meta/tasks.jsonl
53
+ meta/episodes.jsonl
54
+ meta/stats.json
55
+ ```
56
+
57
+ The converted TsFile contains all 119 numeric frame rows in one table named
58
+ `vacuame_train4`.
59
+
60
+ ## Schema
61
+
62
+ | Role | Column(s) | Type | Notes |
63
+ |------|-----------|------|-------|
64
+ | Time | `Time` | INT64 ms | `round(timestamp * 1000)` |
65
+ | TAG | `episode_index`, `task_index` | INT64 | Source columns used as TsFile device tags |
66
+ | FIELD | `frame_index`, `sample_index` | INT64 | `index` is renamed to `sample_index` |
67
+ | FIELD | `action_0` ... `action_5` | FLOAT | Flattened from `action[6]` |
68
+ | FIELD | `observation_state_0` ... `observation_state_5` | FLOAT | Flattened from `observation.state[6]` |
69
+
70
+ ## Conversion Notes
71
+
72
+ - The generic `lerobot` converter was used.
73
+ - `timestamp` is dropped because it is redundant with `Time / 1000` seconds.
74
+ - `frame_index` is kept so rows can be aligned back to source video frames.
75
+ - Vector columns preserve the source feature name with `.` replaced by `_`:
76
+ `observation.state` becomes `observation_state_0..observation_state_5`, and
77
+ `action` becomes `action_0..action_5`.
78
+ - Video features are omitted from the converted repository. Use the original
79
+ dataset's `videos/` tree for camera data.
80
+ - Source `meta/` files are mirrored; `meta/info.json` is updated with a
81
+ `tsfile_conversion` object documenting the converted path, schema roles,
82
+ flattened features, dropped features, omitted videos, and row count.
83
+
84
+ ## Usage
85
+
86
+ ```python
87
+ from tsfile import TsFileReader
88
+
89
+ reader = TsFileReader("data/vacuame_train4.tsfile")
90
+ schemas = reader.get_all_table_schemas()
91
+ table_name = next(iter(schemas))
92
+
93
+ columns = [
94
+ "episode_index",
95
+ "task_index",
96
+ "frame_index",
97
+ "observation_state_0",
98
+ "action_0",
99
+ ]
100
+
101
+ with reader.query_table(table_name, columns, batch_size=65536) as result:
102
+ while (batch := result.read_arrow_batch()) is not None:
103
+ df = batch.to_pandas()
104
+ # Process rows here.
105
+
106
+ reader.close()
107
+ ```
108
+
109
+ ## Citation
110
+
111
+ ```bibtex
112
+ @misc{vacuame_train4,
113
+ title = {train4 (LeRobot SO-100)},
114
+ author = {Vacuame},
115
+ url = {https://huggingface.co/datasets/Vacuame/train4},
116
+ publisher = {Hugging Face}
117
+ }
118
+ ```
data/vacuame_train4.tsfile ADDED
Binary file (4.05 kB). View file
 
meta/info.json CHANGED
@@ -11,138 +11,226 @@
11
  "splits": {
12
  "train": "0:2"
13
  },
14
- "data_path": "data/chunk-{episode_chunk:03d}/episode_{episode_index:06d}.tsfile",
15
- "video_path": "videos/chunk-{episode_chunk:03d}/{video_key}/episode_{episode_index:06d}.mp4",
16
  "features": {
17
- "action": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  "dtype": "float32",
19
  "shape": [
20
- 6
21
  ],
22
- "names": [
23
- "main_shoulder_pan",
24
- "main_shoulder_lift",
25
- "main_elbow_flex",
26
- "main_wrist_flex",
27
- "main_wrist_roll",
28
- "main_gripper"
29
- ]
30
  },
31
- "observation.state": {
32
  "dtype": "float32",
33
  "shape": [
34
- 6
35
  ],
36
- "names": [
37
- "main_shoulder_pan",
38
- "main_shoulder_lift",
39
- "main_elbow_flex",
40
- "main_wrist_flex",
41
- "main_wrist_roll",
42
- "main_gripper"
43
- ]
44
  },
45
- "observation.images.laptop": {
46
- "dtype": "video",
47
- "shape": [
48
- 480,
49
- 640,
50
- 3
51
- ],
52
- "names": [
53
- "height",
54
- "width",
55
- "channels"
56
- ],
57
- "info": {
58
- "video.fps": 30.0,
59
- "video.height": 480,
60
- "video.width": 640,
61
- "video.channels": 3,
62
- "video.codec": "av1",
63
- "video.pix_fmt": "yuv420p",
64
- "video.is_depth_map": false,
65
- "has_audio": false
66
- }
67
  },
68
- "observation.images.phone": {
69
- "dtype": "video",
70
- "shape": [
71
- 480,
72
- 640,
73
- 3
74
- ],
75
- "names": [
76
- "height",
77
- "width",
78
- "channels"
79
- ],
80
- "info": {
81
- "video.fps": 30.0,
82
- "video.height": 480,
83
- "video.width": 640,
84
- "video.channels": 3,
85
- "video.codec": "av1",
86
- "video.pix_fmt": "yuv420p",
87
- "video.is_depth_map": false,
88
- "has_audio": false
89
- }
90
  },
91
- "timestamp": {
92
  "dtype": "float32",
93
  "shape": [
94
  1
95
  ],
96
- "names": null
97
  },
98
- "frame_index": {
99
- "dtype": "int64",
100
  "shape": [
101
  1
102
  ],
103
- "names": null
104
  },
105
- "episode_index": {
106
- "dtype": "int64",
107
  "shape": [
108
  1
109
  ],
110
- "names": null
111
  },
112
- "index": {
113
- "dtype": "int64",
114
  "shape": [
115
  1
116
  ],
117
- "names": null
118
  },
119
- "task_index": {
120
- "dtype": "int64",
 
 
 
 
 
 
 
121
  "shape": [
122
  1
123
  ],
124
- "names": null
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  }
126
  },
 
127
  "tsfile_conversion": {
128
  "source_dataset": "Vacuame/train4",
129
  "source_data_path": "data/chunk-{episode_chunk:03d}/episode_{episode_index:06d}.parquet",
130
- "converted_data_path": "data/chunk-{episode_chunk:03d}/episode_{episode_index:06d}.tsfile",
131
  "table_name": "vacuame_train4",
 
132
  "time_precision": "ms",
133
- "time_column": "Time = round(frame_index * 1000 / 30)",
 
 
 
 
134
  "tag_columns": [
135
- "episode_id",
136
- "task_id"
137
  ],
138
  "row_count": 119,
139
- "episode_files": 2,
140
- "vector_columns_flattened": {
141
- "observation.state": "state_0..state_5",
142
- "action": "action_0..action_5"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  },
144
- "frame_alignment": "episode_index selects the TsFile/video file; frame_index aligns with video frame index; episode_timestamp_s aligns with video time in seconds.",
145
- "notes": "meta/ and videos/ are mirrored from the source repository; only Parquet data is converted to TsFile."
146
- },
147
- "source_data_path": "data/chunk-{episode_chunk:03d}/episode_{episode_index:06d}.parquet"
148
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  "splits": {
12
  "train": "0:2"
13
  },
14
+ "data_path": "data/vacuame_train4.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": "Vacuame/train4",
140
  "source_data_path": "data/chunk-{episode_chunk:03d}/episode_{episode_index:06d}.parquet",
141
+ "converted_data_path": "data/vacuame_train4.tsfile",
142
  "table_name": "vacuame_train4",
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": 119,
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.laptop",
182
+ "observation.images.phone"
183
+ ],
184
+ "original_video_path": "videos/chunk-{episode_chunk:03d}/{video_key}/episode_{episode_index:06d}.mp4",
185
+ "original_video_features": {
186
+ "observation.images.laptop": {
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.fps": 30.0,
200
+ "video.height": 480,
201
+ "video.width": 640,
202
+ "video.channels": 3,
203
+ "video.codec": "av1",
204
+ "video.pix_fmt": "yuv420p",
205
+ "video.is_depth_map": false,
206
+ "has_audio": false
207
+ }
208
+ },
209
+ "observation.images.phone": {
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.fps": 30.0,
223
+ "video.height": 480,
224
+ "video.width": 640,
225
+ "video.channels": 3,
226
+ "video.codec": "av1",
227
+ "video.pix_fmt": "yuv420p",
228
+ "video.is_depth_map": false,
229
+ "has_audio": false
230
+ }
231
+ }
232
+ },
233
+ "original_video_source": "https://huggingface.co/datasets/Vacuame/train4/tree/main/videos",
234
+ "video_policy": "Videos are not uploaded to this repository; use the original HuggingFace dataset videos."
235
+ }
236
+ }