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

[Tests] Disable retries and use context manager for openai client #7565

Merged
merged 4 commits into from
Aug 27, 2024

Conversation

njhill
Copy link
Member

@njhill njhill commented Aug 15, 2024

The openai python client by default retries failed requests up to two times. In our tests I think we should disable this to avoid hiding issues.

Doing this actually caused some failures (at least with another PR I'm working on), which seem to be related to how a single client fixture is shared between multiple async tests.

The openai docs suggest it should be used via a context manager so I have updated the various usages to do so and have reduced the scope of associated client fixtures.

Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which consists a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of default ones by unblocking the steps in your fast-check build on Buildkite UI.

Once the PR is approved and ready to go, please make sure to run full CI as it is required to merge (or just use auto-merge).

To run full CI, you can do one of these:

  • Comment /ready on the PR
  • Add ready label to the PR
  • Enable auto-merge.

🚀

Copy link
Member

@youkaichao youkaichao left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@DarkLight1337
Copy link
Member

DarkLight1337 commented Aug 16, 2024

The guided decoding tests have been shown to be fragile (see #5526 (comment)). Seems like changing the usage of OpenAI client in this way breaks them as well.

@njhill
Copy link
Member Author

njhill commented Aug 27, 2024

Thanks @DarkLight1337. I was digging into the cause of the failures here but got diverted, going to resume that now :)

The openai python client by default retries failed requests up to two times. In our tests I think we should disable this to avoid hiding issues.

Doing this actually caused some other failures, which seem to be related to how a single client fixture is shared between multiple async tests.

The openai docs suggest it should be used via a context manager so I have updated the various usages to do so and have reduced the scope of associated client fixtures.
@njhill njhill added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 27, 2024
@njhill njhill merged commit 39178c7 into vllm-project:main Aug 27, 2024
32 checks passed
@njhill njhill deleted the oai-client-retries branch August 27, 2024 04:33
K-Mistele pushed a commit to Constellate-AI/vllm that referenced this pull request Sep 4, 2024
triple-Mu pushed a commit to triple-Mu/vllm_official that referenced this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants