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 text comparison metrics to Ben's PR #632

Merged
merged 23 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,9 @@ repos:
"GeoAlchemy2",
"psycopg2-binary",
"pgvector",
"datasets >= 2.20.0",
"absl-py",
"nltk",
"rouge_score",
"evaluate",
]
13 changes: 6 additions & 7 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
FROM python:3.10-alpine
FROM python:3.10-slim

ARG VERSION="0.0.0-dev"
ARG VALOR_VERSION="0.0.0-dev"

RUN apk add --update --no-cache build-base libpq-dev gcc libffi-dev
RUN apt-get update && apt-get install build-essential libpq-dev -y

COPY ./pyproject.toml /src/

WORKDIR /src
RUN python -m pip install -U pip
# when building, we'll use setuptools_scm on the hostmachine to get the version
# and then pass it to the build arg VERSION. this is so we don't need to install
# and then pass it to the build arg VALOR_VERSION. this is so we don't need to install
# git and put .git (which setuptools_scm needs to determine the version) in the container
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION} python -m pip install .
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${VALOR_VERSION} python -m pip install .
COPY ./valor_api /src/valor_api
RUN apk del build-base
USER 65532:65532

CMD ["uvicorn", "valor_api.main:app", "--host", "0.0.0.0", "--log-level", "warning"]
5 changes: 5 additions & 0 deletions api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ dependencies = [
"pgvector",
"openai",
"mistralai",
"datasets >= 2.20.0",
"absl-py",
"nltk",
"rouge_score",
"evaluate"
]

[build-system]
Expand Down
Loading
Loading