Skip to content

Commit db0bc67

Browse files
author
Pegah Zargarian
committed
fix: G-Eval timeout — cap max_geval_responses=1, disable inter-judge variance by default, increase DeepEval timeout to 180s
1 parent 97d3393 commit db0bc67

4 files changed

Lines changed: 20 additions & 10 deletions

File tree

agentscope/dashboard/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def run_evaluation(
9595
label="Evaluation inputs (one query per line)",
9696
lines=4,
9797
placeholder="What is the refund policy?\nHow do I reset my password?",
98-
value="What was the revenue for Q3?\nWhat are the key features of the product?\nWho is the CEO of XYZ Corporation?",
98+
value="What was the revenue for Q3?",
9999
)
100100

101101
with gr.Row():

agentscope/tools/geval_tool.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import warnings
23
from deepeval.metrics import GEval, ConversationalGEval
34
from deepeval.test_case import LLMTestCase, LLMTestCaseParams, ConversationalTestCase, Turn
@@ -130,14 +131,15 @@ def run(state: AgentState) -> AgentState:
130131
primary_model=model_name,
131132
))
132133

133-
# Inter-judge variance — single-turn metrics only
134+
# Inter-judge variance disabled by default — enable by setting AGENTSCOPE_VARIANCE=1
134135
variance_results = []
135-
for sm in scored_metrics:
136-
if sm.test_cases:
137-
try:
138-
variance_results.append(measure_inter_judge_variance(sm))
139-
except Exception as e:
140-
warnings.warn(f"variance measurement failed for {sm.name}: {e}")
136+
if os.environ.get("AGENTSCOPE_VARIANCE") == "1":
137+
for sm in scored_metrics:
138+
if sm.test_cases:
139+
try:
140+
variance_results.append(measure_inter_judge_variance(sm))
141+
except Exception as e:
142+
warnings.warn(f"variance measurement failed for {sm.name}: {e}")
141143

142144
# Calibration drift — compare against prior run baseline if provided
143145
baseline = state.get("baseline_geval_scores") or {}

config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ eval:
2121
latency_orange: 5.0
2222
# Evaluation pipeline cost limits
2323
max_synth_pairs: 50
24-
max_geval_responses: 100
24+
max_geval_responses: 1 # score only 1 response to avoid rate limits during testing
2525
eval_budget_usd: 2.00

run_dashboard.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ cd /Users/pegahzargarian/projects/MCP-1/workspace/AgenticScope
55
# Load AgentScope keys
66
set -a
77
source .env
8-
# Load capstone-rag DB + model config (overwrites model with Haiku)
8+
# Load capstone-rag DB + model config
99
source /Users/pegahzargarian/projects/MCP-1/workspace/capstone-rag/.env
1010
set +a
1111

12+
# Give DeepEval more time per API call (default 88s is too short for Haiku under load)
13+
export DEEPEVAL_PER_ATTEMPT_TIMEOUT_SECONDS_OVERRIDE=180
14+
15+
# Disable inter-judge variance by default (prevents OpenAI timeout)
16+
export AGENTSCOPE_VARIANCE=0
17+
18+
export PYTHONPATH=/Users/pegahzargarian/projects/MCP-1/workspace/AgenticScope
19+
1220
source .venv/bin/activate
1321
python -m agentscope.dashboard.app

0 commit comments

Comments
 (0)