MM-ArkBench
MM-ArkBench v0.1 Pilot is a repository-level screenshot-to-ArkTS code retrieval dataset. Given a UI screenshot and an ArkTS repository, the data links the screenshot to likely implementing .ets files and symbols.
Pilot contents
- 101 repository records from 100 selected GitHub/Gitee repositories pinned to exact acquired commits.
- 24,021 ArkTS files.
- 190,882 extracted components, classes, functions, builders, and methods.
- 994 screenshot queries: 916 repository-native screenshot queries and 78 connected-device runtime screenshot queries, each with repository-local positive file/symbol labels.
- 352 repository-native images processed with offline Chinese/English OCR.
- Train/validation/test splits grouped by exact repository ETS-content family.
All query labels in v0.1 are automatic. The included annotation workbook is intended to produce the first human-verified subset; this release does not claim that 100 queries have already been manually validated.
Loading
from datasets import load_dataset
queries = load_dataset("hreyulog/Arkts-mm-ui-pilot", "queries")
corpus = load_dataset("hreyulog/Arkts-mm-ui-pilot", "corpus")
symbols = load_dataset("hreyulog/Arkts-mm-ui-pilot", "symbols")
repositories = load_dataset("hreyulog/Arkts-mm-ui-pilot", "repositories")
For a local checkout:
from datasets import load_dataset
queries = load_dataset(
"parquet",
data_files={
"train": "data/queries/train-*.parquet",
"validation": "data/queries/validation-*.parquet",
"test": "data/queries/test-*.parquet",
},
)
Configs
queries: screenshot, OCR/context, provenance, positive files/symbols, confidence, and label evidence.corpus: repository-local ArkTS files with code, UI text, imports, routes, and symbols.symbols: extracted ArkTS/ArkUI symbols with source spans and code.repositories: commit, platform, license evidence, split family, and processing status.
Repositories with identical normalized ETS-content hash sets share a repository_family; is_family_representative and family_representative_repo_id provide a canonical view without discarding provenance.
queries.query_type distinguishes:
repo_screenshot: screenshots or UI previews found in the repository/README/docs.runtime_screenshot: screenshots captured from a connected HarmonyOS/OpenHarmony device.doc_or_promo: documentation, architecture, or promotional images retained for auditing.unknown: insufficient evidence.
Repository-source details such as readme, docs, repository_asset, Markdown path, heading, line number, and README candidates are stored in matching_evidence rather than separate top-level query columns.
Label construction
Images are selected from README, docs, screenshot, preview, and related repository paths. Exact duplicate images are removed per repository. Candidate code is ranked using:
- common directory ancestry between screenshot and source;
- image filename and ArkTS path/name overlap;
- README caption and neighboring Markdown;
- offline OCR overlap with code UI strings;
- ArkUI page/component signals.
matching_evidence records why each direct or supporting file was selected. label_confidence is a construction heuristic, not a calibrated probability.
Examples of provenance evidence include source:readme, source:repository_asset, readme:markdown_path=README.md, and readme:line=42.
Licensing and provenance
Every row retains repository URL, acquired commit, source path, and license classification. Code and image bytes are included only for repositories classified under the Pilot's redistributable-license allowlist. License evidence is retained verbatim in the repositories config. Users remain responsible for complying with each upstream project and asset license.
To request correction or removal, identify the repository, commit, and affected path.
Limitations
- Labels are automatic and can be noisy, especially in large sample aggregators.
- Regex-based ArkTS parsing is intentionally tolerant but is not a full ArkTS compiler frontend.
- Repository screenshots may show versions that differ from the acquired commit.
- OCR is available for 352 Pilot images; other rows retain an empty OCR field.
- v0.1 mostly contains repository assets. It also includes 78 runtime screenshots captured from buildable Pilot projects on a connected HarmonyOS/OpenHarmony device.
- Runtime screenshots use
label_status=automatic_runtime_verified: the app was built, installed, launched, and screenshotted automatically, while the screenshot-to-code file/symbol labels are still heuristic.
Review app
Clone this dataset repository and run:
pip install -r scripts/requirements.txt
python auto_annotator/run_review_app.py --limit 300 --port 8765
Then open http://127.0.0.1:8765/index.html. The app shows the screenshot, README context, OCR, candidate ArkTS files, and code snippets. Export JSONL after review and apply it with:
python scripts/apply_review_results.py mmarkbench_review.jsonl
Reproduction
The scripts directory contains acquisition, parsing, OCR, export, rebuild, upload, and validation utilities. provenance/pilot_100_manifest.jsonl pins the selected repositories. Run the validation script before upload.
- Downloads last month
- 28