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:
parent
ace38eaf76
commit
565ba11790
@ -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'),
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@ -21,6 +21,18 @@ from ..spec import DatasetSpec
|
||||
)
|
||||
)
|
||||
def swe_bench_verified_agentic():
|
||||
from .swe_bench_verified import _record_to_sample
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user