The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: TypeError
Message: Couldn't cast array of type list<item: int64> to null
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2840, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2373, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2398, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2312, in cast_table_to_schema
cast_array_to_feature(
~~~~~~~~~~~~~~~~~~~~~^
table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feature,
^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1861, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2068, in cast_array_to_feature
_c(array.field(name) if name in array_fields else null_array, subfeature)
~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1863, in wrapper
return func(array, *args, **kwargs)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2152, in cast_array_to_feature
return array_cast(
array,
...<2 lines>...
allow_decimal_to_str=allow_decimal_to_str,
)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1863, in wrapper
return func(array, *args, **kwargs)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2016, in array_cast
raise TypeError(f"Couldn't cast array of type {_short_str(array.type)} to {_short_str(pa_type)}")
TypeError: Couldn't cast array of type list<item: int64> to nullNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Widget2Code Bench Data v2
Evaluation targets for Widget2Code, rebuilt so that the picture a person reviews is the picture a model is trained on and scored against.
| directory | samples | contents |
|---|---|---|
train-v2/ |
1,822 | training screenshots and canonical metadata |
test-v2/ |
1,000 | evaluation screenshots and canonical metadata |
train-v2/image_0004/
test-v2/image_0001/
├── image.png # RGB, no alpha channel
└── metadata.json
Why v2 exists
Every target in Widget2Code Data V4.1 is RGBA, and its readers disagreed about what that meant.
PIL.Image.convert("RGB") — used by the benchmark, by the training image loader, by the vLLM
inference path and by the conversation's own image pipeline — drops the alpha channel and keeps
whatever RGB is stored underneath. A browser composites instead. So a person reviewing a target
saw one picture while the model was trained and scored on another.
Usually the disagreement was a few antialiased corner pixels. In 61 targets the capture had left
a whole neighbouring widget under the mask, and the model was scored on reproducing content no
design contains. On those, the reference render — the best answer the source pool has — scored
SSIM 0.5532 against the stored target and 0.6990 against the flattened one, against a pool
mean of 0.7664.
Every target here is RGB with no alpha, so the three readers now see the same pixels.
What changed from V4.1 train/ and test/
127 of 2,822 targets differ visibly; the rest differ only where antialiased edge pixels were composited.
| change | targets |
|---|---|
| hidden content covered by the flat background | 61 |
| cropped to the bounding box of non-transparent pixels | 108 |
| both | 42 |
The background is white because it was measured, not assumed: on the affected samples the
reference render scores 0.7163 against a white-flattened target, 0.6161 against the stored
one and 0.5557 against a black-flattened one.
A transparent margin is what the capture left around the widget, not part of the design, so it is cropped away. An opaque white margin is kept — a pixel the capture recorded as opaque is part of the design. 140 targets therefore still carry a white border.
metadata.json
{
"id": "image_2052",
"split": "test-v2",
"sha256": "...", // of this image.png
"category": "tools", // null when not labelled
"has_chart": null,
"side_info": { // prompt-ready, derived from these pixels
"dims": [243, 293],
"ocr": "- `\"Hello, Hayat\"` at (19.8%, 8.5%) of widget, font-height ≈ 12.3% ...",
"palette": "Target widget palette (top-4, after AA-fringe consolidation): ..."
},
"flattened_from": {
"split": "test",
"original_sha256": "...",
"stored_size": [434, 444],
"crop_box": [95, 76, 338, 369], // null when nothing was cropped
"transparent_fraction": 0.651254,
"hidden_colours": 1171, // distinct RGB values under the mask
"background": [255, 255, 255]
}
}
side_info was regenerated from the new pixels with the benchmark 1.2.0 CPU container, the same
generator that produced the V4.1 metadata — verified by reproducing V4.1's own side_info byte
for byte on all 1,822 of its train targets. CPU output is canonical; GPU OCR follows a different
numeric path.
The eval ground-truth feature cache carried by V4.1 is not included: it describes pixels
that changed. A benchmark that misses it recomputes those features, which is correct and slower.
Pairing with reference sources
The sft-v4 reference pool in
Widget2Code-Data-V4 hard-codes
each target's stored canvas in its root width/height, so 108 of those sources no longer
match these targets. Regenerate the references against train-v2/test-v2 rather than pairing
the two directly.
Download
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="Djanghao/Widget2Code-Bench-Data",
repo_type="dataset",
local_dir="Widget2Code-Bench-Data",
)
- Downloads last month
- 39