SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.06215 · ICLR · 2025

DataEnvGym: Data Generation Agents in Teacher Environments with Student Feedback

Jaemin Cho, Mohit Bansal, Zaid Khan, Elias Stengel-Eskin

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2410.06215.json · badge: /api/ran/2410.06215.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
codezakh/dataenvgym canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
extract_code_in_markdown_backticks Ran
ran; our contract draft was wrong, not the code
codezakh/dataenvgym/src/dataenvgym/utils.py
code served (permissive licence) · get_code("dec9b5793e1db075")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

def extract_code_in_markdown_backticks(model_output: str) -> str:
    outputlines = model_output.split('\n')
    opening_backticks_idx = next((i for i, line in enumerate(outputlines) if line.startswith('```')), None)
    if opening_backticks_idx is None:
        return '\n'.join(outputlines)
    closing_backticks_idx = next((i for i, line in enumerate(outputlines[opening_backticks_idx:]) if line.endswith('```')), None)
    if closing_backticks_idx is None:
        return '\n'.join(outputlines)
    if opening_backticks_idx + 1 >= closing_backticks_idx:
        return '\n'.join(outputlines)
    return '\n'.join(outputlines[opening_backticks_idx + 1:closing_backticks_idx])


# Test case 1: model output with valid code in markdown backticks
model_output_1 = """Here is some code:

def hello():
    print("world")

That's all."""

ARGS = {
    "model_output": model_output_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
format_records_for_llama_factory_sft Ran
ran; our contract draft was wrong, not the code
codezakh/dataenvgym/src/dataenvgym/llama_factory_utils.py
code served (permissive licence) · get_code("52040a03e753ccda")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import os
import tempfile
from typing import Collection

# Create a temporary directory for the llama_factory_dataset_dir
temp_dir = tempfile.mkdtemp()

# Create sample records as a collection of dicts
sample_records = [
    {
        "instruction": "What is machine learning?",
        "output": "Machine learning is a subset of artificial intelligence that enables systems to learn and improve from experience."
    },
    {
        "instruction": "Explain neural networks.",
        "output": "Neural networks are computational models inspired by biological neural networks that constitute animal brains."
    },
    {
        "instruction": "What is deep learning?",
        "output": "Deep learning is a subset of machine learning that uses artificial neural networks with multiple layers."
    }
]

ARGS = {
    "jsonl_records_path_or_collection": sample_records,
    "llama_factory_dataset_dir": temp_dir,
    "instruction_key": "instruction",
    "response_key": "output",
    "overwrite": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
loguru, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_experiment_path_from_script_name Ran
ran; our contract draft was wrong, not the code
codezakh/dataenvgym/src/dataenvgym/experiment_utils.py
code served (permissive licence) · get_code("e8cebe1229936609")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PosixPath. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from pathlib import Path

ARGS = {
    "script_name": "train_model.py"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_output_dir_for_prev_experiment Ran
ran; our contract draft was wrong, not the code
codezakh/dataenvgym/src/dataenvgym/experiment_utils.py
code served (permissive licence) · get_code("bd09a6c2fa8f2bf5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PosixPath. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from pathlib import Path
import tempfile
import os

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
experiments_dir = Path(temp_dir) / 'experiments'
experiments_dir.mkdir(exist_ok=True)

# Create a sample experiment directory with a numeric prefix
sample_exp_dir = experiments_dir / '42_sample_experiment'
sample_exp_dir.mkdir(exist_ok=True)

# Create the workspace directory that get_experiment_path_from_script_name expects
workspace_dir = Path(temp_dir) / 'workspace'
workspace_dir.mkdir(exist_ok=True)

# Create the expected output directory for the experiment
output_dir_name = 'experiments__42_sample_experiment'
expected_output_dir = workspace_dir / output_dir_name
expected_output_dir.mkdir(exist_ok=True)

# Change to temp directory so relative paths work
original_cwd = os.getcwd()
os.chdir(temp_dir)

try:
    # Test with Path argument
    ARGS = {
        'experiment_identifier': Path(temp_dir) / 'experiments' / '42_sample_experiment'
    }
finally:
    os.chdir(original_cwd)
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
implements Ran
ran; our contract draft was wrong, not the code
codezakh/dataenvgym/src/dataenvgym/gym/domain_models.py
code served (permissive licence) · get_code("421d77d00740f5dd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import functools
from typing import Callable, Type, TypeVar, Protocol

P = TypeVar('P')

# Create a simple Protocol for testing
class SimpleProtocol(Protocol):
    def method(self) -> str:
        ...

# Create a concrete class that implements the protocol
class ConcreteImplementation:
    def method(self) -> str:
        return "implemented"

# Define ARGS dictionary with all parameters for the implements function
ARGS = {
    'protocol': SimpleProtocol
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_llama_factory_cli_args Not yet run
unverified (harvested, no recorded run)
codezakh/dataenvgym/src/dataenvgym/llama_factory_utils.py
code served (permissive licence) · get_code("93549046b4ecf909")
How it ran

no invocation recorded.

make_output_dir_for_run Not yet run
unverified (harvested, no recorded run)
codezakh/dataenvgym/src/dataenvgym/experiment_utils.py
code served (permissive licence) · get_code("ba9fccea11f2d5a9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The process of creating training data to teach models is currently driven by humans, who manually analyze model weaknesses and plan how to create data that improves a student model. Recent approaches using large language models (LLMs) as annotators reduce human annotation effort, but still require humans to interpret feedback from evaluations and control the LLM to produce data the student needs. Automating this labor-intensive process by creating autonomous data generation agents -or teachers -is desirable, but requires environments that can simulate the feedback-driven, iterative, closed loop of data creation. To enable rapid and scalable testing for such agents and their modules, we introduce DATAENVGYM, a testbed of teacher environments for data generation agents. DATAENVGYM frames data generation as a sequential decision-making task, involving an agent consisting of a data generation policy (which generates a plan for creating training data) and a data generation engine (which transforms the plan into data), inside an environment that provides feedback from a student. The agent's end goal is to improve student model performance. Students are iteratively trained and evaluated on generated data, with their feedback (in the form of errors or weak skills) being reported to the agent after each iteration. As a general-purpose testbed, DATAENVGYM includes multiple instantiations of teacher environments across three levels of structure in the state representation and action space, with varying levels of scaffolding support. More structured environments are based on automatically-inferred skills and offer a higher degree of interpretability and control over the curriculum. We support developing and testing data generation agents in four diverse tasks covering text, images, and actions (mathematics, programming, visual question answering, and tool-use) and test multiple student and teacher models. We find that example agents in our teaching environments can iteratively improve students across diverse tasks and settings. Moreover, we show that environments can teach different skill levels and can be used to test variants of key modules, pointing to directions of future work in improving data generation agents, engines, and feedback mechanisms. Project page: https://DataEnvGym.github.io.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2410.06215")
get_code_for_paper("2410.06215")
have("2410.06215")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2410.06215.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2410.06215.svg)](https://syntology.ai/paper/2410.06215)

Connect an agent — have() is free.