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

Sequence Removal #267

merged 2 commits into from
May 22, 2025

Conversation

alanzhang25
Copy link
Collaborator

πŸ“ Summary

Full Removal of Sequences and changing is_sequence to is_trace.

🎯 Purpose

πŸ§ͺ Testing

βœ… Checklist

  • Self-review
  • Video demo of changes
  • Unit Tests and CI/CD tests are passing
  • Reviewers assigned

πŸ“Œ Linear Issue

✏️ Additional Notes

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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_sequence is consistently renamed to is_trace in function signatures, API parameters, and comments.
  • Test Simplification: A specific test case (example2) and several parameters (project_name, model, override) are removed from the judgment.assert_test call in the demo test file, suggesting a simplification or removal of sequence-specific testing logic.

Changelog

  • src/demo/sequence_test.py
    • Removed example2 which was likely related to sequence testing.
    • Removed project_name, model, and override arguments from the judgment.assert_test function call.
  • src/judgeval/run_evaluation.py
    • Renamed the is_sequence parameter to is_trace in the check_experiment_type function signature and docstring.
    • Renamed the is_sequence key to is_trace in the dictionary passed to the requests.post call within check_experiment_type.
    • Updated comments in run_trace_eval and run_eval to reflect the change from 'sequences' to 'traces'.
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

  1. 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. ↩

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 in src/demo/sequence_test.py will now use different project_name, model, and override settings due to removed parameters in the judgment.assert_test call. 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 in src/judgeval/run_evaluation.py describing the purpose of a call to check_experiment_type is potentially misleading given that is_trace=False is passed to the function. This could cause confusion for future maintainers. (Commented)
  • Code Comment Clarity in run_trace_eval: In src/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. Since check_experiment_type is called with is_trace=True and 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:

  1. A potential unintended change in test behavior in src/demo/sequence_test.py.
  2. 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.

Comment on lines 150 to 155
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
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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 in JudgmentClient.assert_test).
  • model: Was "gpt-4.1-mini", will now be "gpt-4.1" (the default).
  • override: Was True, will now be False (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?

@alanzhang25 alanzhang25 force-pushed the az-full-sequence-deprecation branch from 48d743d to 60e6f53 Compare May 20, 2025 23:49
@JCamyre JCamyre self-requested a review May 22, 2025 00:24
@JCamyre JCamyre added the In Review Task is currently being reviewed label May 22, 2025
Copy link
Collaborator

@JCamyre JCamyre left a 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

Copy link
Collaborator

@JCamyre JCamyre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@JCamyre JCamyre enabled auto-merge (squash) May 22, 2025 19:19
@JCamyre JCamyre merged commit e72e440 into main May 22, 2025
2 of 3 checks passed
@JCamyre JCamyre deleted the az-full-sequence-deprecation branch July 11, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In Review Task is currently being reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants