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

feature/fast-embeddings #405

Merged
merged 9 commits into from
May 17, 2024
Merged

feature/fast-embeddings #405

merged 9 commits into from
May 17, 2024

Conversation

gecBurton
Copy link
Collaborator

@gecBurton gecBurton commented May 17, 2024

Context

As a User I want the model to be loaded on start up and not on every embedding, so that the embeddings are done quickly

Changes proposed in this pull request

Previously we were using the fastapi Depends to handle dependency injection for the ml model, but this loads the model on every function call.

We could not switch to fastapi's lifetime because this is incompatible with faststream.

By reverting to pure faststream we can use its own lifetime which does work but this requires that we switch away from the http health check to a container healthcheck

Guidance to review

Relevant links

depends on https://github.com/i-dot-ai/i-ai-core-infrastructure/pull/260

Things to check

@gecBurton gecBurton marked this pull request as draft May 17, 2024 12:33
@gecBurton gecBurton changed the title use container healthcheck feature/fast-embeddings May 17, 2024
@gecBurton gecBurton marked this pull request as ready for review May 17, 2024 13:51
@gecBurton gecBurton merged commit a5609e3 into main May 17, 2024
10 checks passed
@gecBurton gecBurton deleted the feature/container-health-check branch May 17, 2024 16:15
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