-
Notifications
You must be signed in to change notification settings - Fork 17
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
moved to faststream #143
moved to faststream #143
Conversation
Oh gosh, this looks fantastic. So clean ✨ |
6591604
to
cf87714
Compare
@@ -48,7 +48,7 @@ jobs: | |||
mkdir -p data/elastic/ | |||
chmod 777 data/elastic/ | |||
cp .env.test .env | |||
docker compose up -d --wait elasticsearch minio rabbitmq | |||
docker compose up -d --wait elasticsearch minio |
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 for this in CI anymore
@@ -45,8 +45,6 @@ test-django: | |||
test-integration: | |||
poetry install --no-root --no-ansi --with dev --without ai,streamlit-app,api,django-app,pytest-django,worker,ingest | |||
poetry run pytest tests | |||
docker compose up -d --wait db |
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.
fixing an unrelated error
@@ -1,8 +1,34 @@ | |||
import argparse |
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.
largely brought this back exactly as it was
|
||
RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install --no-root --no-ansi --with worker,ingest --without ai,dev,api,streamlit-app | ||
|
||
FROM python:3.11-slim-buster as runtime |
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.
this contradicts everything above it
from redbox.models.llm import Embedding, EmbeddingResponse | ||
|
||
MODEL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "models") | ||
|
||
log = logging.getLogger() | ||
log.setLevel(logging.INFO) | ||
|
||
env = Settings() | ||
|
||
|
||
class SentenceTransformerDB(collections.UserDict): |
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 have removed the dependancy on the Settings here so that it can be called without an .env
existing, e.g. at build time
Context
faststream is an abstraction layer for various queuing technologies, by using this instead of
pika
directly we can:Changes proposed in this pull request
ingest
andembed
workers have been rewrittenpika
has been removedAlso, the .env was missing from the Dockerfile(s) which caused the e2e tests to fail
Guidance to review
Relevant links
https://technologyprogramme.atlassian.net/browse/REDBOX-99
Things to check