Datasets:
|
Download pymethods2test_v1/README.md from FWeindel/validated-tasks: direct link, hf CLI and curl.
- Browser
- Download file 6.48 kB
-
https://huggingface.co/datasets/FWeindel/validated-tasks/resolve/refs%2Fpr%2F32/pymethods2test_v1/README.md
- Command line
-
hf download hf://datasets/FWeindel/validated-tasks@refs/pr/32/pymethods2test_v1/README.md
-
curl -L -o README.md https://huggingface.co/datasets/FWeindel/validated-tasks/resolve/refs%2Fpr%2F32/pymethods2test_v1/README.md
6.48 kB
| # [PyMethods2Test](https://huggingface.co/datasets/open-thoughts/TaskTrove/tree/946884702046be1a7dcea2638186ad6b0d2ea103/DCAgent__exp_rpt_pymethods2test-large-v2) | |
| ## Dataset stats | |
| - **Original tasks:** 4,990 | |
| - **Kept:** 4,990 | |
| - **Changed:** 4,990 | |
| - **Archived:** 0 | |
| - **Images:** 1 image before, 3 images now. | |
| ## Dataset characteristics | |
| PyMethods2Test turns Python methods and their unit tests into tasks: implement the described function in `/app/solution.py` so that the supplied pytest suite passes. | |
| <details><summary>Domains</summary> | |
| **Software Engineering:** Every sampled task asks the agent to write one self-contained Python function with a prescribed name and signature into /app/solution.py (e.g. GCD of a list, factorial mod 1e9+7, BFS over digit multiplications, additive-sequence check, triangular-number ranges). A pytest/unittest file derived from the original focal method's unit test is the verifier, and metadata marks each item as source 'pymethods2test' with the repo/path fields blank. The work is pure code implementation from a natural-language spec; there is no existing codebase, system state, data, or external service involved. | |
| </details> | |
| <details><summary>Capabilities</summary> | |
| **Specification Adherence:** Intended practice: the hidden tests import a specific function name from /app/solution.py and check exact return shapes (a dict keyed by natural numbers, the tuple ('YES', x, y, z) versus the bare string 'NO', a default argument of '', integer division for means, float tolerance for the Nim probability), so the agent must keep the stated file path, signature, and output contract rather than drift toward a more natural design. Several instructions also contain details the tests contradict or omit (e.g. the additive-sequence example claims '123' is False but the test asserts True; the Nim example output 0.2 does not match the test values), so reward depends on matching the original repository's behavior, not polishing the prose spec. No trajectories were supplied, so this is inferred from task structure, not observed behavior. **Mathematical Derivation:** A minority of sampled tasks require working out the formula before coding: the straw problem needs the insight that the best rectangle splits N into floor(N/4)^2 versus x*(x+1) side lengths, and the Nim problem requires recognizing an XOR-convolution raised to the n-th power by repeated squaring to pass the n=1e9 test within the timeout. Most tasks (string matching, GCD, factorial, scaling scores) need no derivation, so this is a secondary target observed only in the task contents, not in any trajectory. These are intended capabilities inferred from task examples, not measured agent behavior. Labels follow [CLI-Universe](https://arxiv.org/abs/2606.22883v1). | |
| </details> | |
| Intended benchmark transfer: **HumanEval+**, Same problem shape: implement a single Python function from a natural-language description with examples, graded by hidden functional tests that include edge cases (empty input, minimal values, large inputs). Practicing exact signature/return-type compliance against stricter-than-shown tests directly targets what EvalPlus's expanded tests catch; **MBPP+**, The tasks are short, mostly algorithmic Python functions (GCD, factorial modulo, triangular numbers, sequence checks) with a required function name and assert-style unit tests, which closely matches MBPP+ problems and their extended test suites. The 4,990 verifiable items provide execution-grounded reward for exactly this style of entry-level Python programming. | |
| ## Per-stage breakdown | |
| - **1. Build and setup: 4,990 changed, 0 archived.** Changed all 4,990 tasks to pin pytest, which was installed unpinned, and to use the supported shared verifier environment setting. Changed 19 tasks to install NumPy, which their reference solutions import but their images never installed. | |
| - **2. Reference solution (reward 1): 4,990 changed, 0 archived.** Changed all 4,990 tasks to add an entry point that runs the supplied reference solution. Changed 38 reference solutions to add a missing standard-library import, such as `from collections import deque`; function bodies and tests are unchanged. All 4,990 reference solutions scored 1. | |
| - **3. No-op baseline (reward 0): 0 changed, 0 archived.** All 4,990 tasks scored 0 without a solution. Manually approved 176 false positives from the no-op checker, which could not confirm verifier execution; the corresponding reference solutions passed. In each, the tests stopped only because the missing solution module could not be imported. | |
| - **4. Rule-based checks: 4,990 changed, 0 archived.** Changed all 4,990 tasks so their instruction ends with the time limit and the request not to cheat. Flagged 88 tasks for relative paths. Automatic repair cleared warnings for 15 tasks. 73 tasks still have warnings. Inspected 50: all were fine, naming `solution.py` in the `/app` working directory where the verifier reads it. All other rule-based checks passed. Git-history and timestamp cleanup do not apply: the tasks contain no repository. | |
| The reference-solution leak check ran on 177 tasks, all passing; it did not run on the remaining 4,813. | |
| ## Per-task resource requirements | |
| | CPUs | Memory | Agent timeout | Verifier timeout | Tasks | | |
| | ---: | ---: | ---: | ---: | ---: | | |
| | Unspecified | Unspecified | 900 s | 720 s | 4,990 | | |
| ## Runtime and validation time | |
| - **Versions:** Python **3.12.14**, Harbor **0.8.1**, Apptainer backend; tasks run Python 3.10 with pytest 9.1.1, or 9.0.2 for the 55 repaired tasks. | |
| - **Implementation:** [Marin Harbor `7faf878c14b6`](https://github.com/marin-community/harbor/tree/7faf878c14b6d72737579ec936ebf5f74ba3194d) with [our runtime patches](https://github.com/MLI-lab/OT-next-data/tree/main/harbor_patches). | |
| - **Resources:** CLAIX jobs of **16 CPU cores, 64 GiB RAM** with trial concurrency 4; one repaired task ran on Helma with **8 CPU cores, 15 GiB RAM**; image building uses **4 CPU cores and 8 GiB RAM per image**. Includes the full validation run and reruns of repaired tasks. | |
| | Stage | Measured tasks | Summed task time | Mean per task | Median per task | | |
| | --- | --- | --- | --- | --- | | |
| | 1. Build and setup (container start and setup) | 4,990 (all kept) | 133.6 h | 96.4 s | 6.2 s | | |
| | 2. Reference solution | 4,990 (all kept) | 148.5 h | 107.2 s | 23.5 s | | |
| | 3. No-op baseline | 4,990 (all kept) | 121.6 h | 87.7 s | 23.1 s | | |
| | 4. Rule-based checks | 4,990 (all kept) | 0.4 h | 0.3 s | 0.3 s | | |