@@ -43,6 +43,7 @@ class DiffPatchSlice:
4343 name : str
4444 relative_path : str
4545 metrics : tuple [DiffPatchMetric , ...]
46+ held_out_sample_cap : int
4647
4748 @property
4849 def tags (self ) -> tuple [str , ...]:
@@ -65,18 +66,21 @@ def to_raw_dataset(self, raw_root: str, metric: DiffPatchMetric) -> RawTextEvalu
6566 name = "issue_to_patch" ,
6667 relative_path = "swe_bench/issue_to_patch.jsonl.gz" ,
6768 metrics = (DiffPatchMetric .PATCH_TEXT , DiffPatchMetric .CONTEXT_PLUS_PATCH ),
69+ held_out_sample_cap = 256 ,
6870 ),
6971 DiffPatchSlice (
7072 source = "swe_bench" ,
7173 name = "raw_git_diff" ,
7274 relative_path = "swe_bench/raw_git_diff.jsonl.gz" ,
7375 metrics = (DiffPatchMetric .PATCH_TEXT ,),
76+ held_out_sample_cap = 256 ,
7477 ),
7578 DiffPatchSlice (
7679 source = "commitpack" ,
7780 name = "commit_message_plus_diff" ,
7881 relative_path = "commitpack/commit_message_plus_diff.jsonl.gz" ,
7982 metrics = (DiffPatchMetric .PATCH_TEXT , DiffPatchMetric .CONTEXT_PLUS_PATCH ),
83+ held_out_sample_cap = 512 ,
8084 ),
8185)
8286
@@ -154,6 +158,26 @@ def build_diff_patch_raw_validation_sets(
154158 return datasets
155159
156160
161+ def diff_patch_source_sampling_plan (
162+ * ,
163+ slices : tuple [DiffPatchSlice , ...] = DIFF_PATCH_SLICES ,
164+ ) -> dict [str , dict [str , object ]]:
165+ """Small held-out sampling plan for source builders.
166+
167+ The plan is intentionally metadata-only so source integration can cap
168+ downloads before data ingestion.
169+ """
170+
171+ return {
172+ f"{ slice_spec .source } /{ slice_spec .name } " : {
173+ "held_out_sample_cap" : slice_spec .held_out_sample_cap ,
174+ "split" : "validation" ,
175+ "source" : slice_spec .source ,
176+ }
177+ for slice_spec in slices
178+ }
179+
180+
157181ACTIVE_DIFF_PATCH_DATASETS : dict [str , RawTextEvaluationDataset ] = build_diff_patch_raw_validation_sets ()
158182
159183
0 commit comments