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

add vespa + embedding timeout env variables #2689

Merged
merged 7 commits into from
Oct 9, 2024
Merged

Conversation

pablonyx
Copy link
Contributor

@pablonyx pablonyx commented Oct 5, 2024

Description

[Provide a brief description of the changes in this PR]

How Has This Been Tested?

[Describe the tests you ran to verify your changes]

Accepted Risk

[Any know risks or failure modes to point out to reviewers]

Related Issue(s)

[If applicable, link to the issue(s) this PR addresses]

Checklist:

  • All of the automated tests pass
  • All PR comments are addressed and marked resolved
  • If there are migrations, they have been rebased to latest main
  • If there are new dependencies, they are added to the requirements
  • If there are new environment variables, they are added to all of the deployment methods
  • If there are new APIs that don't require auth, they are added to PUBLIC_ENDPOINT_SPECS
  • Docker images build and basic functionalities work
  • Author has done a final read through of the PR right before merge

Copy link

vercel bot commented Oct 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2024 3:04am

@pablonyx pablonyx marked this pull request as ready for review October 5, 2024 19:59
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds new environment variables VESPA_REQUEST_TIMEOUT and CLIENT_EMBEDDING_TIMEOUT to configure timeouts for Vespa requests and embedding clients. The changes are implemented in backend configuration files and Docker Compose files for development environments.

  • Added VESPA_REQUEST_TIMEOUT in backend/danswer/configs/app_configs.py for Vespa request timeouts
  • Introduced CLIENT_EMBEDDING_TIMEOUT in backend/danswer/configs/model_configs.py for OpenAI and VoyageAI embedding timeouts
  • Applied VESPA_REQUEST_TIMEOUT to HTTP client instances in backend/danswer/document_index/vespa/index.py
  • Implemented CLIENT_EMBEDDING_TIMEOUT in backend/model_server/encoders.py for embedding clients
  • Added both new environment variables to docker-compose.dev.yml and docker-compose.gpu-dev.yml

6 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings

@@ -395,6 +395,8 @@
os.environ.get("CUSTOM_ANSWER_VALIDITY_CONDITIONS", "[]")
)

VESPA_REQUEST_TIMEOUT = int(os.environ.get("VESPA_REQUEST_TIMEOUT", 0)) or None
Copy link

Choose a reason for hiding this comment

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

style: Consider adding a comment explaining the purpose and usage of this new variable

Comment on lines 29 to 30
# Only used for OpenAI and VoyageAI
CLIENT_EMBEDDING_TIMEOUT = int(os.environ.get("CLIENT_EMBEDDING_TIMEOUT") or 0) or None
Copy link

Choose a reason for hiding this comment

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

style: Add a comment explaining the purpose and expected format of CLIENT_EMBEDDING_TIMEOUT

Copy link
Contributor

@yuhongsun96 yuhongsun96 left a comment

Choose a reason for hiding this comment

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

Let's just remove it from the deployment files, the rest is good

@pablonyx pablonyx added this pull request to the merge queue Oct 9, 2024
Merged via the queue into main with commit d5b9a6e Oct 9, 2024
7 checks passed
@pablonyx pablonyx deleted the customize_timeouts branch October 17, 2024 23:14
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.

2 participants