Skip to content

Commit ffaebe8

Browse files
Benny ChenBenny Chen
authored andcommitted
nits
1 parent 1ae92c1 commit ffaebe8

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

eval_protocol/mcp/clients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, intermediary_server_url: str):
2929

3030
async def connect(self):
3131
"""Establishes connection and MCP session."""
32-
if self._mcp_session is not None:
32+
if self._mcp_session is not None and not self._mcp_session.is_closed:
3333
logger.debug("Already connected.")
3434
return
3535

eval_protocol/rewards/accuracy.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -436,20 +436,6 @@ def accuracy_reward(
436436
metrics={"accuracy": MetricResult(score=0.0, is_score_valid=False, reason="Invalid GT message type.")},
437437
)
438438

439-
# If ground truth content is empty after coercion, short-circuit with a clear reason
440-
if ground_truth_comparison_text.strip() == "":
441-
return EvaluateResult(
442-
score=0.0,
443-
reason="Ground truth has no content.",
444-
metrics={
445-
"accuracy": MetricResult(
446-
score=0.0,
447-
is_score_valid=False,
448-
reason="Ground truth has no content.",
449-
)
450-
},
451-
)
452-
453439
extracted_answer = extract_fn(model_response_text) if extract_fn else extract_math_expression(model_response_text)
454440
if (
455441
not extracted_answer

0 commit comments

Comments
 (0)