swe datasets: carry version/patch/hints/created_at in metadata

Official make_test_spec indexes MAP_REPO_VERSION_TO_SPECS[repo][version]
-- a None version KeyError'd the official scorer (first agentic run
scored 0 with 'KeyError: None' hidden in details). The base converter
never copied these fields; both variants now carry them, verified with
a live make_test_spec call (spec + 2KB eval script + correct image key).

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
sora 2026-09-18 08:11:18 +00:00
parent ace38eaf76
commit 565ba11790
2 changed files with 18 additions and 2 deletions

View File

@ -37,6 +37,10 @@ def _record_to_sample(record: dict) -> Sample:
'PASS_TO_PASS': record['PASS_TO_PASS'],
'environment_setup_commit': record.get('environment_setup_commit'),
'difficulty': record.get('difficulty'),
'version': record.get('version'), # official MAP_REPO_VERSION_TO_SPECS key
'patch': record.get('patch'),
'hints_text': record.get('hints_text'),
'created_at': record.get('created_at'),
},
)

View File

@ -21,6 +21,18 @@ from ..spec import DatasetSpec
)
)
def swe_bench_verified_agentic():
def to_sample(record: dict):
from .swe_bench_verified import _record_to_sample
return _record_to_sample
s = _record_to_sample(record)
# official make_test_spec requires these raw fields
md = s.metadata or {}
md.setdefault('version', record.get('version') or '')
md.setdefault('patch', record.get('patch') or '')
md.setdefault('hints_text', record.get('hints_text') or '')
md.setdefault('created_at', record.get('created_at') or '')
md['problem_statement'] = record.get('problem_statement') or s.input_text
s.metadata = md
return s
return to_sample