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

Bench: add option to disable Polly #6557

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

janhartman
Copy link
Contributor

@janhartman janhartman commented Jan 8, 2025

Polly often randomly fails on requests with no clear error even if passthrough mode is enabled. Since we don't want it enabled for context evals anyway, it's probably better to disable it outright.

Test plan

Running bench with a larger eval set like DS1000 for context now works without errors.

@janhartman janhartman requested a review from jtibshirani January 8, 2025 14:08
Copy link
Member

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

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

Shouldn't this be covered by CODY_RECORDING_MODE? Maybe we should check if CODY_RECORDING_MODE === passthrough and avoid starting the polly recording, instead of introducing a new environment variable.

@janhartman
Copy link
Contributor Author

Shouldn't this be covered by CODY_RECORDING_MODE? Maybe we should check if CODY_RECORDING_MODE === passthrough and avoid starting the polly recording, instead of introducing a new environment variable.

That option still starts Polly (Polly has a pass-through mode) and causes errors even though it shouldn't. Polly is apparently quite buggy!
We can also just not start Polly if recording mode = passthrough?

@jtibshirani
Copy link
Member

We can also just not start Polly if recording mode = passthrough?

Yep let's do that! I think it's nicer from a user perspective to just have one environment variable, and for us to do the right thing under the hood to make it work.

@janhartman janhartman requested a review from jtibshirani January 8, 2025 18:50
@janhartman janhartman changed the title Add option to disable Polly for running bench Bench: disable Polly if passthrough mode is set Jan 8, 2025
@pkukielka
Copy link
Contributor

pkukielka commented Jan 9, 2025

Can we just add additional mode like CODY_RECORDING_MODE=disabled instead of changing meaning of passthrough? Passthrough is sometimes useful when debugging pollyjs issues, e.g. when one want to check if changes to pollyjs related code works in general and just recording is a problem.
It also seems to be more correct semantically.

@janhartman
Copy link
Contributor Author

@pkukielka Noted! Will adjust.

@janhartman janhartman changed the title Bench: disable Polly if passthrough mode is set Bench: add option to disable Polly Jan 9, 2025
Copy link
Contributor

@pkukielka pkukielka left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants