| --- |
| license: apache-2.0 |
| language: |
| - en |
| size_categories: |
| - n<1K |
| tags: |
| - reinforcement-learning |
| - code |
| - llm |
| - swe-rl |
| - harbor |
| - pr_diff |
| --- |
| |
| [](https://huggingface.co/spaces/HuggingFaceH4/harbor-visualiser?dataset=Ktanmay21/aws-cli-diff) |
|
|
| # aws-cli-diff |
|
|
| Generated by [**Repo2RLEnv**](https://github.com/huggingface/Repo2RLEnv) — turning real GitHub repositories into verifiable RL environments. |
|
|
| > 💡 **Browse this dataset in your browser** — click the badge above or open |
| > [`HuggingFaceH4/harbor-visualiser`](https://huggingface.co/spaces/HuggingFaceH4/harbor-visualiser?dataset=Ktanmay21/aws-cli-diff) |
| > to inspect every task's spec, instruction, oracle patch, test script, and Dockerfile. |
|
|
| - **Source repo**: [`aws/aws-cli`](https://github.com/aws/aws-cli) |
| - **Pipeline**: [`pr_diff`](https://github.com/huggingface/Repo2RLEnv/blob/main/docs/pipelines/pr_diff.md) |
| - **Tasks**: 15 |
| - **Visibility**: public |
| - **Spec**: Harbor task format with the `[metadata.repo2env]` extension |
|
|
| ## How it was generated |
|
|
| Each task in this dataset was produced by the [`pr_diff` pipeline](https://github.com/huggingface/Repo2RLEnv/blob/main/docs/pipelines/pr_diff.md). The pipeline mines real merged pull requests / commits from the source repo(s), applies quality filters, strips information-leakage from the instruction text, and emits a [Harbor](https://github.com/harbor-framework/harbor)-shaped task directory with the gold patch as the oracle. |
|
|
| Reproduce locally: |
|
|
| ```bash |
| pip install repo2rlenv |
| repo2rlenv generate \ |
| --repo <owner>/<repo> \ |
| --pipeline pr_diff \ |
| --pipeline-opt limit=10 \ |
| --out ./datasets/my-pr_diff |
| ``` |
|
|
| See the [pipeline docs](https://github.com/huggingface/Repo2RLEnv/blob/main/docs/pipelines/pr_diff.md) for the full option list + reward design. |
|
|
| ## Run with Harbor |
|
|
| Each task ships a `environment/Dockerfile` and `tests/test.sh`, so you can |
| score patches end-to-end: |
|
|
| ```bash |
| # Pull the dataset locally |
| repo2rlenv pull Ktanmay21/aws-cli-diff /tmp/aws-cli-diff |
| |
| # Confirm structural soundness — oracle adapter applies the gold patch |
| # and must score reward = 1.000 |
| harbor run -p /tmp/aws-cli-diff -a oracle --env docker |
| |
| # Score an agent (claude-code + Sonnet 4.6) |
| harbor run \ |
| -p /tmp/aws-cli-diff \ |
| -a claude-code -m anthropic/claude-sonnet-4-6 \ |
| --ak max_budget_usd=2.00 \ |
| --ae ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \ |
| --env docker |
| ``` |
| The reward is a **6-component diff-similarity** score (format / size / file-targeting / region-overlap / changes-only similarity / LLM-judge). The `--ve ANTHROPIC_API_KEY=...` verifier-env pass enables the LLM-judge component; without it the verifier still produces a valid score with `llm_judge: null` and the deterministic weights renormalized. Full breakdown in `/logs/verifier/reward.json`. |
|
|
| ## Reward signal |
|
|
| The reward function is part of the task itself (`tests/test.sh` + the |
| verifier code baked into the image). The full per-task breakdown is |
| written to `/logs/verifier/reward.json` at run time — useful for slicing |
| training data by component. |
|
|
| See the [pipeline doc](https://github.com/huggingface/Repo2RLEnv/blob/main/docs/pipelines/pr_diff.md#multi-component-reward) for the component-by-component design. |
|
|
| ## Layout |
|
|
| ``` |
| tasks/ |
| └── <task-id>/ |
| ├── task.toml # Harbor task with [metadata.repo2env] |
| ├── instruction.md # natural-language prompt |
| ├── solution/ |
| │ ├── patch.diff # oracle (gold) diff |
| │ └── solve.sh # oracle adapter applies patch.diff |
| ├── environment/ |
| │ └── Dockerfile # builds the task's container |
| └── tests/ |
| └── test.sh # verifier — writes /logs/verifier/reward.txt |
| ``` |
|
|
| ## License |
|
|
| Apache-2.0 — same as Repo2RLEnv itself. The original PR contents remain |
| under their respective source-repo licenses; this dataset redistributes |
| public commits under fair-use for ML research / training-data purposes. |
|
|