Skip to content

Sequence Removal #267

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

Merged
merged 2 commits into from
May 22, 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
12 changes: 0 additions & 12 deletions src/demo/sequence_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,12 @@ def generate_itinerary(destination, start_date, end_date):
}
]
)
example2 = Example(
input={"destination": "Tokyo", "start_date": "2025-06-01", "end_date": "2025-06-02"},
expected_tools=[
{"tool_name": "search_tavily", "parameters": {"query": "Best tourist attractions in Tokyo"}},
{"tool_name": "search_tavily", "parameters": {"query": "Best hotels in Tokyo"}},
{"tool_name": "search_tavily", "parameters": {"query": "Flights to Tokyo from major cities"}},
{"tool_name": "search_tavily", "parameters": {"query": "Weather forecast for Tokyo from 2025-06-01 to 2025-06-03"}}
]
)

judgment.assert_test(
project_name="travel_agent_demo",
examples=[example],
scorers=[ToolOrderScorer()],
model="gpt-4.1-mini",
function=generate_itinerary,
tracer=tracer,
override=True
)


Expand Down
10 changes: 5 additions & 5 deletions src/judgeval/run_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ def check_missing_scorer_data(results: List[ScoringResult]) -> List[ScoringResul
)
return results

def check_experiment_type(eval_name: str, project_name: str, judgment_api_key: str, organization_id: str, is_sequence: bool) -> None:
def check_experiment_type(eval_name: str, project_name: str, judgment_api_key: str, organization_id: str, is_trace: bool) -> None:
"""
Checks if the current experiment, if one exists, has the same type (examples of sequences)
Checks if the current experiment, if one exists, has the same type (examples of traces)
"""
try:
response = requests.post(
Expand All @@ -220,7 +220,7 @@ def check_experiment_type(eval_name: str, project_name: str, judgment_api_key: s
"eval_name": eval_name,
"project_name": project_name,
"judgment_api_key": judgment_api_key,
"is_sequence": is_sequence
"is_trace": is_trace
},
verify=True
)
Expand Down Expand Up @@ -382,7 +382,7 @@ def run_trace_eval(trace_run: TraceRun, override: bool = False, ignore_errors: b
)

if trace_run.append:
# Check that the current experiment, if one exists, has the same type (examples of sequences)
# Check that the current experiment, if one exists, has the same type (examples or traces)
check_experiment_type(
trace_run.eval_name,
trace_run.project_name,
Expand Down Expand Up @@ -756,7 +756,7 @@ def run_eval(evaluation_run: EvaluationRun, override: bool = False, ignore_error
)

if evaluation_run.append:
# Check that the current experiment, if one exists, has the same type (examples of sequences)
# Check that the current experiment, if one exists, has the same type (examples of traces)
check_experiment_type(
evaluation_run.eval_name,
evaluation_run.project_name,
Expand Down
Loading