7a0da7932b
OSV-Scanner (Scheduled) / scan-scheduled (push) Failing after 0s
Create Release / test-gate (push) Has been cancelled
Create Release / release-gate (push) Has been cancelled
Create Release / ci-gate (push) Has been cancelled
Create Release / version-check (push) Has been cancelled
Create Release / e2e-test-gate (push) Has been cancelled
Create Release / responsive-test-gate (push) Has been cancelled
Create Release / compat-test-gate (push) Has been cancelled
Create Release / compose-integration-gate (push) Has been cancelled
Create Release / vulture-gate (push) Has been cancelled
Create Release / build (push) Has been cancelled
Create Release / provenance (push) Has been cancelled
Create Release / prerelease-docker (push) Has been cancelled
Create Release / publish-docker (push) Has been cancelled
Create Release / create-release (push) Has been cancelled
Create Release / cleanup-changelog (push) Has been cancelled
Create Release / trigger-pypi (push) Has been cancelled
Create Release / monitor-pypi (push) Has been cancelled
Create Release / Clean up orphan prerelease tags and signatures (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-form] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-metrics] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-workflow] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-core] (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [history-news] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [library] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [link-analytics] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-core] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-lifecycle] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [error-benchmark] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-pages] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) (push) Has been cancelled
Docker Tests (Consolidated) / Accessibility Tests (push) Has been cancelled
Docker Tests (Consolidated) / LLM Unit Tests (push) Has been cancelled
Docker Tests (Consolidated) / LLM Example Tests (push) Has been cancelled
Docker Tests (Consolidated) / Production Image Smoke Test (push) Has been cancelled
Docker Tests (Consolidated) / Infrastructure Tests (push) Has been cancelled
OSSF Scorecard / OSSF Security Scorecard Analysis (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [mobile] (push) Has been cancelled
Backwards Compatibility / Verify Encryption Constants (push) Has been cancelled
Backwards Compatibility / PyPI Version Compatibility (push) Has been cancelled
Backwards Compatibility / Database Migration Tests (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Docker Tests (Consolidated) / detect-changes (push) Has been cancelled
Docker Tests (Consolidated) / Build Test Image (push) Has been cancelled
Docker Tests (Consolidated) / All Pytest Tests + Coverage (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [accessibility] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [api-crud] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-login] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-pages] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-register] (push) Has been cancelled
117 lines
3.3 KiB
Python
117 lines
3.3 KiB
Python
#!/usr/bin/env python
|
|
"""
|
|
SimpleQA Benchmark Runner for Local Deep Research.
|
|
|
|
This script provides a convenient way to run the SimpleQA benchmark.
|
|
|
|
Usage:
|
|
# Install dependencies with PDM
|
|
cd /path/to/local-deep-research
|
|
pdm install
|
|
|
|
# Run the script with PDM
|
|
pdm run python examples/benchmarks/run_simpleqa.py --help
|
|
"""
|
|
|
|
import argparse
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# Import the benchmark functionality
|
|
from local_deep_research.benchmarks.benchmark_functions import evaluate_simpleqa
|
|
|
|
|
|
def main():
|
|
"""Run the SimpleQA benchmark with the specified parameters."""
|
|
parser = argparse.ArgumentParser(description="Run SimpleQA benchmark")
|
|
parser.add_argument(
|
|
"--examples", type=int, default=10, help="Number of examples to run"
|
|
)
|
|
parser.add_argument(
|
|
"--iterations", type=int, default=3, help="Number of search iterations"
|
|
)
|
|
parser.add_argument(
|
|
"--questions", type=int, default=3, help="Questions per iteration"
|
|
)
|
|
parser.add_argument(
|
|
"--search-tool", type=str, default="searxng", help="Search tool to use"
|
|
)
|
|
parser.add_argument(
|
|
"--output-dir",
|
|
type=str,
|
|
default=str(Path("examples") / "benchmarks" / "results" / "simpleqa"),
|
|
help="Output directory",
|
|
)
|
|
parser.add_argument(
|
|
"--no-eval", action="store_true", help="Skip evaluation"
|
|
)
|
|
|
|
# Optional evaluation parameters
|
|
parser.add_argument(
|
|
"--human-eval", action="store_true", help="Use human evaluation"
|
|
)
|
|
parser.add_argument(
|
|
"--eval-model", type=str, help="Model to use for evaluation"
|
|
)
|
|
parser.add_argument(
|
|
"--eval-provider", type=str, help="Provider to use for evaluation"
|
|
)
|
|
|
|
# Add model configuration options
|
|
parser.add_argument(
|
|
"--search-model", type=str, help="Model to use for the search system"
|
|
)
|
|
parser.add_argument(
|
|
"--search-provider",
|
|
type=str,
|
|
help="Provider to use for the search system",
|
|
)
|
|
parser.add_argument(
|
|
"--endpoint-url",
|
|
type=str,
|
|
help="Endpoint URL for OpenRouter or other API services",
|
|
)
|
|
parser.add_argument(
|
|
"--search-strategy",
|
|
type=str,
|
|
default="source_based",
|
|
choices=[
|
|
"source_based",
|
|
"standard",
|
|
"rapid",
|
|
"parallel",
|
|
"iterdrag",
|
|
"modular",
|
|
],
|
|
help="Search strategy to use (default: source_based)",
|
|
)
|
|
parser.add_argument("--api-key", type=str, help="API key for LLM provider")
|
|
|
|
args = parser.parse_args()
|
|
|
|
print(f"Starting SimpleQA benchmark with {args.examples} examples...")
|
|
|
|
# Run the benchmark
|
|
results = evaluate_simpleqa(
|
|
num_examples=args.examples,
|
|
search_iterations=args.iterations,
|
|
questions_per_iteration=args.questions,
|
|
search_tool=args.search_tool,
|
|
human_evaluation=args.human_eval,
|
|
evaluation_model=args.eval_model,
|
|
evaluation_provider=args.eval_provider,
|
|
output_dir=args.output_dir,
|
|
)
|
|
|
|
# Print summary
|
|
print("\nSimpleQA Benchmark Results:")
|
|
print(f" Accuracy: {results.get('accuracy', 0):.3f}")
|
|
print(f" Total examples: {results.get('total_examples', 0)}")
|
|
print(f" Report saved to: {results.get('report_path', '')}")
|
|
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|