-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Detect GPU on startup for default multi-pass indexing value #2242
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
backend/danswer/main.py
Outdated
@@ -341,6 +370,9 @@ async def lifespan(app: FastAPI) -> AsyncGenerator: | |||
|
|||
translate_saved_search_settings(db_session) | |||
|
|||
# update multipass indexing setting based on GPU availability | |||
update_default_multipass_indexing(db_session) |
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.
I would place this later (after the embedding warm up setup) because that step has backoff and retries. Otherwise this call to check GPU could run before the model server is actually up
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.
note that the call later on checks for the inference server, not indexing
c03a1c7
to
c1fbbfa
Compare
else: | ||
model_server_url = f"{MODEL_SERVER_HOST}:{MODEL_SERVER_PORT}" | ||
|
||
if "http" not in model_server_url: |
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.
No need to change but if this is now repeated functionality, we can pull it out into a function
Description
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: