Spaces:
Running
Running
openhands commited on
Commit ·
24ccc42
1
Parent(s): ab22529
Remove agenteval.json, use hardcoded mappings as single source of truth
Browse filesSimplify the data loader by removing the agenteval.json config file and
its loading logic. The benchmark-to-category mappings are now defined
directly in the code, eliminating redundancy and potential inconsistencies.
Files changed (2)
- data/1.0.0-dev1/agenteval.jsonDeleted-98
- simple_data_loader.py+15-51
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798{ "suite_config": { "name": "openhands-index", "version": "1.0.0-dev1", "splits": [ { "name": "test", "tasks": [ { "name": "swe-bench", "tags": [ "Overall", "Issue Resolution", "swe-bench" ] }, { "name": "swe-bench-multimodal", "tags": [ "Overall", "Frontend", "swe-bench-multimodal" ] }, { "name": "commit0", "tags": [ "Overall", "Greenfield", "commit0" ] }, { "name": "swt-bench", "tags": [ "Overall", "Testing", "swt-bench" ] }, { "name": "gaia", "tags": [ "Overall", "Information Gathering", "gaia" ] } ] }, { "name": "validation", "tasks": [ { "name": "swe-bench", "tags": [ "Overall", "Issue Resolution", "swe-bench" ] }, { "name": "swe-bench-multimodal", "tags": [ "Overall", "Frontend", "swe-bench-multimodal" ] }, { "name": "commit0", "tags": [ "Overall", "Greenfield", "commit0" ] }, { "name": "swt-bench", "tags": [ "Overall", "Testing", "swt-bench" ] }, { "name": "gaia", "tags": [ "Overall", "Information Gathering", "gaia" ] } ] } ] }}108 unmodified lines109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167108 unmodified linesself.split = splitself.config_path = self.data_dir / config# Load suite configurationconfig_file = self.config_path / "agenteval.json"if config_file.exists():with open(config_file) as f:suite_config = json.load(f)self.suite_config = suite_config["suite_config"]else:self.suite_config = {"name": "openhands-index","version": config,"splits": []}# Build tag map from config - organize benchmarks by categoryself.tag_map = {}self.benchmark_to_categories = {} # Maps benchmark name to its categories# Try loading from config firstconfig_has_mappings = Falsefor split_config in self.suite_config.get("splits", []):if split_config["name"] == split:for task in split_config.get("tasks", []):task_name = task["name"]# Store which categories this benchmark belongs toself.benchmark_to_categories[task_name] = []for tag in task.get("tags", []):# Skip "Overall" and the benchmark's own nameif tag != "Overall" and tag != task_name:# This is a category tagif tag not in self.tag_map:self.tag_map[tag] = []if task_name not in self.tag_map[tag]:self.tag_map[tag].append(task_name)self.benchmark_to_categories[task_name].append(tag)config_has_mappings = True# FALLBACK: If no mappings loaded from config, use hard-coded category mappingsif not config_has_mappings:print("[DATA_LOADER] No agenteval.json found, using fallback category mappings")fallback_mappings = {'swe-bench': ['Issue Resolution'],'swe-bench-multimodal': ['Frontend'],'commit0': ['Greenfield'],'swt-bench': ['Testing'],'gaia': ['Information Gathering'],}for benchmark, categories in fallback_mappings.items():self.benchmark_to_categories[benchmark] = categoriesfor category in categories:if category not in self.tag_map:self.tag_map[category] = []if benchmark not in self.tag_map[category]:self.tag_map[category].append(benchmark)def _load_from_agent_dirs(self):"""Load data from new agent-centric directory structure (results/YYYYMMDD_model/)."""108 unmodified lines109110111112113114115116117118119120121122123124125126127128129130131108 unmodified linesself.split = splitself.config_path = self.data_dir / config# Benchmark to category mappings (single source of truth)self.benchmark_to_categories = {'swe-bench': ['Issue Resolution'],'swe-bench-multimodal': ['Frontend'],'commit0': ['Greenfield'],'swt-bench': ['Testing'],'gaia': ['Information Gathering'],}# Build tag map (category -> benchmarks)self.tag_map = {}for benchmark, categories in self.benchmark_to_categories.items():for category in categories:if category not in self.tag_map:self.tag_map[category] = []if benchmark not in self.tag_map[category]:self.tag_map[category].append(benchmark)def _load_from_agent_dirs(self):"""Load data from new agent-centric directory structure (results/YYYYMMDD_model/)."""
data/1.0.0-dev1/agenteval.jsonDeleted-98
simple_data_loader.py+15-51