-
Notifications
You must be signed in to change notification settings - Fork 82
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
Sequence Removal #267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @alanzhang25, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
Hello team, gemini-code-assist here to provide a summary of this pull request. This PR focuses on removing the concept of 'Sequences' from the codebase and renaming related terminology to 'Traces'. This involves removing specific test cases or configurations related to sequences and updating function parameters, API request keys, and comments to use the term 'trace' instead of 'sequence'. The overall goal appears to be a conceptual shift in how evaluation runs are handled, moving away from 'sequences' towards 'traces'.
Highlights
- Conceptual Removal: The core concept of 'Sequences' is being removed from the codebase.
- Terminology Renaming: The term
is_sequenceis consistently renamed tois_tracein function signatures, API parameters, and comments. - Test Simplification: A specific test case (
example2) and several parameters (project_name,model,override) are removed from thejudgment.assert_testcall in the demo test file, suggesting a simplification or removal of sequence-specific testing logic.
Changelog
- src/demo/sequence_test.py
- Removed
example2which was likely related to sequence testing. - Removed
project_name,model, andoverridearguments from thejudgment.assert_testfunction call.
- Removed
- src/judgeval/run_evaluation.py
- Renamed the
is_sequenceparameter tois_tracein thecheck_experiment_typefunction signature and docstring. - Renamed the
is_sequencekey tois_tracein the dictionary passed to therequests.postcall withincheck_experiment_type. - Updated comments in
run_trace_evalandrun_evalto reflect the change from 'sequences' to 'traces'.
- Renamed the
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with π and π on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
A sequence is gone,
A trace takes its place now,
Code evolves always.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. β©
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request focuses on renaming 'sequence' to 'trace' and removing the 'sequence' concept. The changes in the diff appear consistent with this goal. However, there are a couple of points that need clarification, particularly regarding behavioral changes in a test file and a potentially misleading code comment.
It's also noted that the checklist in the PR description is currently unchecked. It would be helpful to ensure these items are addressed before merging.
Summary of Findings
- Test Behavior Change in
sequence_test.py: The test insrc/demo/sequence_test.pywill now use differentproject_name,model, andoverridesettings due to removed parameters in thejudgment.assert_testcall. This change relies on default values and might alter test outcomes or the organization of test results. Confirmation is needed on whether this behavioral change is intended. (Commented) - Misleading Code Comment in
run_evaluation.py: A comment on line 465 insrc/judgeval/run_evaluation.pydescribing the purpose of a call tocheck_experiment_typeis potentially misleading given thatis_trace=Falseis passed to the function. This could cause confusion for future maintainers. (Commented) - Code Comment Clarity in
run_trace_eval: Insrc/judgeval/run_evaluation.py(line 382, RIGHT), the comment# Check that the current experiment, if one exists, has the same type (examples or traces)is slightly ambiguous. Sincecheck_experiment_typeis called withis_trace=Trueand its docstring refers to(examples of traces), a more consistent phrasing like(examples of traces)or(trace-based)might improve clarity. (Not commented due to review settings - low severity)
Merge Readiness
The pull request makes progress in refactoring 'sequence' to 'trace'. However, there are a couple of medium-severity issues identified:
- A potential unintended change in test behavior in
src/demo/sequence_test.py. - A misleading code comment in
src/judgeval/run_evaluation.py.
I recommend addressing these points to ensure the code's correctness and clarity. Therefore, I am requesting changes. As a reviewer, I am not authorized to approve pull requests; please ensure further review and approval by authorized team members after addressing the feedback.
src/demo/sequence_test.py
Outdated
| judgment.assert_test( | ||
| project_name="travel_agent_demo", | ||
| examples=[example], | ||
| scorers=[ToolOrderScorer(threshold=0.5)], | ||
| model="gpt-4.1-mini", | ||
| function=generate_itinerary, | ||
| tracer=tracer, | ||
| override=True | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The judgment.assert_test call has been modified, removing explicit project_name, model, and override parameters. This means the test will now rely on the default values for these, leading to the following changes:
project_name: Was"travel_agent_demo", will now be"default_test"(the default inJudgmentClient.assert_test).model: Was"gpt-4.1-mini", will now be"gpt-4.1"(the default).override: WasTrue, will now beFalse(the default).
Could you confirm if these changes in test behavior (different project for results, different model, and no longer overriding previous runs by default) are intended for this specific test?
48d743d to
60e6f53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one quick question then will approev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
π Summary
Full Removal of Sequences and changing is_sequence to is_trace.
π― Purpose
π§ͺ Testing
β Checklist
π Linear Issue
βοΈ Additional Notes