Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use judge model for judge analysis #3

Merged
merged 3 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions mcpx_eval/judge.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def analyze_message(self, msg: Dict[str, Any], index: int) -> None:
class Judge:
"""Evaluates model performance on given tests."""

model: str
model: Model
models: List[Model]
ignore_tools: List[str]
db: Database
Expand All @@ -106,6 +106,7 @@ def __init__(
self.ignore_tools = ignore_tools or []
self.db = db or Database()
self.models = []
self.model = Model(name=judge_model)
if models is not None:
for model in models:
self.add_model(model)
Expand Down Expand Up @@ -245,6 +246,7 @@ async def run(
scores = []
total_duration = timedelta(seconds=0)

model_config = ModelApiConfig.get_model_config(self.model)
for model in self.models:
start = datetime.now()
tool_analysis = ToolAnalysis()
Expand All @@ -267,7 +269,7 @@ async def run(
client=mcp_run.Client(
config=mcp_run.ClientConfig(profile=model.profile)
),
model=model.name,
model=model_config,
ignore_tools=self.ignore_tools,
result_type=ScoreModel,
system_prompt=SYSTEM_PROMPT,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mcpx-eval"
version = "0.1.1"
version = "0.1.2"
description = "Open ended tool use evaluation framework"
readme = "README.md"
requires-python = ">=3.12"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.