MHRC-Bench / DATA_ACCESS.md
OvertureMMXXI's picture
Add Croissant RAI metadata, inspection examples, and release resources (#2)
00b6b58
|
Raw History Blame Contribute Delete
5.58 kB
# Accessing MHRC-Bench resources
The code repository contains code. Dataset records, upstream repository
snapshots and testbench assets are hosted separately here.
## Standard task files
This repository contains a compact inspection sample: 256 training records per language, with the existing validation/test representations. The original `sample_manifest.json` records per-file counts; `metadata_manifest.json` verifies the current files. The compact VHDL test file has 513 rows while the classified test content has 496; do not align these by row index.
The full 44,964 / 453 / 1,783 task release is available at [Zanehpn/MHRC-Bench](https://huggingface.co/datasets/Zanehpn/MHRC-Bench). Use that release for full benchmark experiments. Eight small examples are available under [samples/](samples/README.md).
## Repository sources
The existing source archive is pinned to `Zanehpn/MHRC-Bench@cfea433c68462d01dd5c3fb88d4bbefd383bfb7d`.
Download [collected_repos.tar.gz](https://huggingface.co/datasets/Zanehpn/MHRC-Bench/resolve/cfea433c68462d01dd5c3fb88d4bbefd383bfb7d/original_repo/collected_repos.tar.gz)
(34,946,509,655 bytes).
SHA-256: `f48c31af67a45d470776c00455c239a2d38616e70a8d1acf7660eee8fabb42eb`.
Extract into a directory of your choice. The archive's paths begin with
`chisel/`, `systemverilog/`, `vhdl/`, or `hls/`, followed by the source repository
name. For a task path `repo/path/to/file`, look under
`<repository-root>/<language>/repo/path/to/file`.
The archive is a legacy snapshot. Its individual Git revisions have not been
rechecked against the current local-checkout inventory. The separate
[repository inventory](provenance/repositories.json) provides upstream URLs
and observed commits for direct source retrieval and provenance review.
## Enriched context files
From the [full release](https://huggingface.co/datasets/Zanehpn/MHRC-Bench/tree/main), for each language download `valid_content_with_crossfile_context.jsonl` or
`test_content_with_crossfile_context.jsonl`. Every row retains the corresponding
standard task fields. The `crossfile_context` string wraps other source files
with `--- FILE: ... (BEGIN) ---` / `--- FILE: ... (END) ---` markers. Target files
and whitespace-normalised exact copies are excluded. These resources are for
repository context; they do not change the number of validation or test tasks.
## Functional testbench assets
Download [functional_testbenches.tar.gz](resources/functional_testbenches.tar.gz)
and extract it into a separate working directory. It includes source files,
testbench code, build configuration, candidate mappings and the standard test
records needed by the legacy runners. It excludes model predictions, result
tables, compiler outputs and credentials.
This inventory does not establish successful behavioral execution:
| Language | Full test split | Candidate entries | Available DUT files | Entries with located testbench files |
| --- | ---: | ---: | ---: | ---: |
| chisel | 323 | 70 | 23 | 13 |
| systemverilog | 508 | 50 | 50 | 50 |
| vhdl | 496 | 50 | 50 | 50 |
| hls | 456 | 50 | 50 | 37 |
Some candidates are missing source files or runnable harnesses. Read
[functional_coverage.json](resources/functional_coverage.json) before selecting
an evaluation subset. Report the actual coverage; do not infer a pass rate over
all 1,783 tasks from this bundle. Elaborating or compiling alone is not a
behavioral correctness test.
The legacy runners use `g++` for HLS, VCS for the supplied SystemVerilog/VHDL
scripts, and sbt with Chisel/ChiselTest for Chisel. VCS and vendor libraries are
external licensed dependencies. These legacy commands are not interchangeable
with Icarus/GHDL without adapting their build scripts. The packaged Chisel build
specifies Scala 2.13.12, Chisel 6.0.0 and ChiselTest 6.0.0.
For example, from the extracted bundle root:
```bash
python hls_dataset/function_verify/run_function_verify.py /path/to/hls_predictions.jsonl --folders flat --output /path/to/hls_functional_results.jsonl
MHRC_REPO_ROOT=/path/to/original_repositories python vhdl_dataset/function_verify/run_function_verify.py /path/to/vhdl_predictions.jsonl --folders counter --output /path/to/vhdl_functional_results.jsonl
```
Legacy prediction files must follow the exact row order of the bundled
`<language>_dataset/test_content.jsonl`; each record supplies `generated_code`.
Use a fresh extracted working copy because the legacy runners patch local
files during execution. This release corrects the SystemVerilog helper to
compile the replaced DUT, removes attempts to alter system library symlinks,
and makes VHDL repository paths configurable with `MHRC_REPO_ROOT`.
## Integrity and metadata
[resource_manifest.json](resources/resource_manifest.json) lists resource URLs,
sizes and SHA-256 checksums. [croissant.json](croissant.json) describes the actual sample files in this repository.
[full-release-croissant.json](full-release-croissant.json) is an unchanged copy of the full release Croissant/RAI file; use the full-release file when submitting the full benchmark to OpenReview. Public hosting does not confirm an OpenReview upload. Each JSONL representation is modeled separately;
source and testbench archives are non-tabular resources. Third-party notices
and unresolved root licenses are documented in [LICENSE.md](LICENSE.md).
The mirrored repository inventory covers all 583 upstream repositories of the full release; it is a superset of those represented in this compact sample. Unresolved license cases and partial testbench coverage remain unresolved by mirroring.