Skip to content

Add polyglot benchmark implementation#5

Draft
AlexCuadron wants to merge 7 commits intomainfrom
add-polyglot-benchmark
Draft

Add polyglot benchmark implementation#5
AlexCuadron wants to merge 7 commits intomainfrom
add-polyglot-benchmark

Conversation

@AlexCuadron
Copy link
Owner

This PR adds the polyglot benchmark implementation based on the Aider-AI/polyglot-benchmark repository. The benchmark evaluates how effectively an agent can translate natural language coding requests into executable code that passes unit tests across multiple programming languages (Python, JavaScript, Rust, Go, C++, Java).

openhands-agent and others added 7 commits February 25, 2025 04:45
- Added update_llm_config_for_completions_logging to imports
- Modified get_config to accept instance parameter
- Updated llm_config to enable completions logging
- Updated process_instance to pass instance to get_config

This change makes aider_bench save llm_completions in the same way as swe_bench,
with completions being saved in {eval_output_dir}/llm_completions/{instance_id}/
…tions-fork

feat: Enable llm_completions logging in aider_bench
Added a new benchmark based on Aider's polyglot benchmark that supports:
- Multiple programming languages (Python, JS, Rust, Go, C++, Java)
- End-to-end evaluation of code editing capabilities
- Automated test execution and validation
- Parallel evaluation with multiple workers
- Detailed metrics and logging

Key components:
- run_infer.py: Main benchmark implementation
- Dockerfile: Multi-language development environment
- Scripts for running benchmarks and building Docker image
- Helper modules for prompts and utilities
Modified run_infer.sh to support both argument styles:
- Old style: <model> <commit> <agent> <max_iters> <num_workers>
- New style: --llm-config <config> --agent-cls <agent> [other options]

Updated README to document both usage styles with examples.
This maintains backward compatibility with existing scripts.
- Changed imports to use relative paths
- Added __init__.py to helper directory
- This fixes ModuleNotFoundError when running the benchmark
- Added OpenHands root to PYTHONPATH in run_infer.sh
- Changed back to absolute imports in run_infer.py
- This fixes the 'no known parent package' error
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants