Files changed (1) hide show
  1. README.md +202 -0
README.md CHANGED
@@ -40,3 +40,205 @@ configs:
40
  - split: train
41
  path: data/train-*
42
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  - split: train
41
  path: data/train-*
42
  ---
43
+
44
+ # Dataset Card: Android Control Episodes (with Screenshots)
45
+
46
+ ## Dataset Summary
47
+
48
+ This dataset contains Android UI control episodes consisting of:
49
+
50
+ - episode-level metadata (`episode_id`, `goal`)
51
+ - step-by-step instructions (`step_instructions`)
52
+ - action sequences (`actions` as a list of structs)
53
+ - base64-encoded screenshots per step (`screenshots_b64`)
54
+
55
+ Each episode records a short interaction trajectory on an Android device, including what the agent/user attempted to do and how (tap, swipe, text input, etc.).
56
+
57
+ ## Supported Tasks and Benchmarks
58
+
59
+ - UI task planning and control
60
+ - Multimodal grounding (text instructions + UI visual context)
61
+ - Imitation learning / behavior cloning for mobile agents
62
+ - Action prediction and trajectory modeling
63
+
64
+ ## Languages
65
+
66
+ - Prompts and instructions: English
67
+
68
+ ## Dataset Structure
69
+
70
+ ### Data Fields
71
+
72
+ - `episode_id` (int64): Unique identifier of the episode.
73
+ - `goal` (string): Natural language description of the objective for the episode.
74
+ - `screenshots_b64` (list[string]): Base64-encoded screenshots captured along the trajectory. Large; dominates file sizes.
75
+ - `actions` (list[struct]): Sequence of actions taken. Each element has:
76
+ - `action_type` (string): e.g., "open_app", "click", "swipe", "type".
77
+ - `app_name` (string or null): App associated with the action, if any.
78
+ - `direction` (string or null): For gestures like swipe (e.g., "up", "down").
79
+ - `text` (string or null): Text content for typing actions, if applicable.
80
+ - `x` (int64 or null): X coordinate for tap/click.
81
+ - `y` (int64 or null): Y coordinate for tap/click.
82
+ - `step_instructions` (list[string]): Short imperative instructions per step.
83
+
84
+ ### Example Instance (images excluded for brevity)
85
+
86
+ ```json
87
+ {
88
+ "episode_id": 13,
89
+ "goal": "On cruisedeals, I would like to view the cruise schedules for a four-night trip from New York to Canada.",
90
+ "actions": [
91
+ {"action_type": "open_app", "app_name": "CruiseDeals", "direction": null, "text": null, "x": null, "y": null},
92
+ {"action_type": "click", "app_name": null, "direction": null, "text": null, "x": 313, "y": 742},
93
+ {"action_type": "swipe", "app_name": null, "direction": "up", "text": null, "x": null, "y": null}
94
+ ],
95
+ "step_instructions": [
96
+ "Open the cruisedeals app",
97
+ "Click on the suggested searched result",
98
+ "Swipe up to view schedules"
99
+ ],
100
+ "screenshots_b64": ["<base64>", "<base64>", "<base64>"]
101
+ }
102
+ ```
103
+
104
+ ## Data Splits
105
+
106
+ - `train`: 12,232 episodes across 275 Parquet shards (1 row group per file)
107
+ - `test`: 3,051 episodes across 67 Parquet shards (1 row group per file)
108
+
109
+ Total compressed size on the Hub is approximately 67.4 GB (train ≈ 54.3 GB, test ≈ 13.1 GB). The `screenshots_b64` column contributes the majority of the size.
110
+
111
+ Typical per-shard stats (example shard):
112
+
113
+ - ~45 episodes per shard
114
+ - ~6–7 screenshots per episode on average
115
+ - ~5–6 actions per episode on average
116
+ - ~5–6 step instructions per episode on average
117
+
118
+ ## Usage
119
+
120
+ ### Load with Datasets (streaming to avoid full download)
121
+
122
+ ```python
123
+ from datasets import load_dataset
124
+
125
+ ds = load_dataset(
126
+ "parquet",
127
+ data_files="hf://datasets/<owner>/<repo>@~parquet/default/train/*.parquet",
128
+ streaming=True,
129
+ )["train"]
130
+
131
+ for i, ex in enumerate(ds):
132
+ ex.pop("screenshots_b64", None) # skip large images for lightweight inspection
133
+ print(ex["episode_id"], ex["goal"])
134
+ if i >= 4:
135
+ break
136
+ ```
137
+
138
+ ### Materialize a small slice without streaming
139
+
140
+ ```python
141
+ from datasets import load_dataset
142
+
143
+ small = load_dataset(
144
+ "parquet",
145
+ data_files="hf://datasets/<owner>/<repo>@~parquet/default/train/*.parquet",
146
+ split="train[:1%]",
147
+ )
148
+ print(len(small))
149
+ ```
150
+
151
+ ### DuckDB: schema preview and lightweight sampling
152
+
153
+ ```python
154
+ import duckdb
155
+
156
+ # Peek schema of one shard
157
+ duckdb.sql("""
158
+ DESCRIBE SELECT * FROM
159
+ 'hf://datasets/<owner>/<repo>@~parquet/default/train/0000.parquet'
160
+ """).show()
161
+
162
+ # Count rows via metadata only (no full scan)
163
+ duckdb.sql("""
164
+ SELECT SUM(row_group_num_rows) AS total_rows
165
+ FROM parquet_metadata('hf://datasets/<owner>/<repo>@~parquet/default/train/*.parquet')
166
+ """).show()
167
+
168
+ # Sample a few rows excluding heavy images
169
+ duckdb.sql("""
170
+ SELECT episode_id, goal,
171
+ list_length(actions) AS num_actions,
172
+ list_length(step_instructions) AS num_steps
173
+ FROM 'hf://datasets/<owner>/<repo>@~parquet/default/train/*.parquet'
174
+ LIMIT 10
175
+ """).show()
176
+ ```
177
+
178
+ ### PyArrow: footer-only metadata or row-group reads
179
+
180
+ ```python
181
+ from huggingface_hub import HfFileSystem
182
+ import pyarrow.parquet as pq
183
+
184
+ fs = HfFileSystem()
185
+ path = "hf://datasets/<owner>/<repo>@~parquet/default/train/0000.parquet"
186
+
187
+ # Metadata-only: schema & row groups
188
+ with fs.open(path, "rb") as f:
189
+ pf = pq.ParquetFile(f)
190
+ print(pf.schema_arrow)
191
+ print(pf.metadata.num_rows, pf.num_row_groups)
192
+
193
+ # Read a single row group without images
194
+ with fs.open(path, "rb") as f:
195
+ pf = pq.ParquetFile(f)
196
+ cols = [c for c in pf.schema_arrow.names if c != "screenshots_b64"]
197
+ tbl = pf.read_row_group(0, columns=cols)
198
+ print(tbl.slice(0, 3).to_pydict())
199
+ ```
200
+
201
+ ### Dask: predicate/projection pushdown
202
+
203
+ ```python
204
+ import dask.dataframe as dd
205
+
206
+ ddf = dd.read_parquet(
207
+ "hf://datasets/<owner>/<repo>@~parquet/default/train/*.parquet",
208
+ columns=["episode_id", "goal", "actions", "step_instructions"],
209
+ )
210
+ print(ddf.head())
211
+ ```
212
+
213
+ ## Efficiency Tips
214
+
215
+ - Prefer streaming or column selection to avoid downloading `screenshots_b64` unless needed.
216
+ - Use DuckDB `parquet_metadata(...)` or PyArrow `ParquetFile(...).metadata` to inspect sizes/counts without reading data pages.
217
+ - Each file has one row group; shard-level parallelism is straightforward.
218
+
219
+ ## Licensing
220
+
221
+ [More Information Needed]
222
+
223
+ ## Citation
224
+
225
+ If you use this dataset in your work, please cite the source dataset/creators as appropriate and this repository. Example placeholder:
226
+
227
+ ```bibtex
228
+ @misc{android_control_episodes,
229
+ title = {Android Control Episodes Dataset},
230
+ year = {2025},
231
+ url = {https://huggingface.co/datasets/smolagents/android-control}
232
+ }
233
+ ```
234
+
235
+ ## Limitations and Risks
236
+
237
+ - Screenshots are stored as base64 strings and can be large; consider storage and memory implications.
238
+ - Some action fields (e.g., `app_name`, `direction`, `text`) may be null for many steps.
239
+ - Visual UI elements may vary across Android versions/devices.
240
+
241
+ ## Maintainers
242
+
243
+ [more information needed]
244
+