Skip to content

Commit

Permalink
Merge branch 'main' into aayush/smoothing
Browse files Browse the repository at this point in the history
  • Loading branch information
aayush-se authored Oct 22, 2024
2 parents d85100e + 7e6b5ee commit 623c01c
Show file tree
Hide file tree
Showing 75 changed files with 4,280 additions and 2,072 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ RUN apt-get update && \
git && \
rm -rf /var/lib/apt/lists/*

# Install td-grpc-bootstrap
RUN curl -L https://storage.googleapis.com/traffic-director/td-grpc-bootstrap-0.16.0.tar.gz | tar -xz && \
mv td-grpc-bootstrap-0.16.0/td-grpc-bootstrap /usr/local/td-grpc-bootstrap && \
rm -rf td-grpc-bootstrap-0.16.0

# Make python3.11 the default python version if necessary
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ gocd: ## Build GoCD pipelines
cd ./gocd/generated-pipelines && find . -type f \( -name '*.yaml' \) -print0 | xargs -n 1 -0 yq -p json -o yaml -i
.PHONY: gocd

upgrade-package-versions:
upgrade-package-versions: ## Upgrade package versions in requirements.txt from constraints in requirements-constraints.txt
pip-compile --upgrade --strip-extras --quiet requirements-constraints.txt -o requirements.txt

HEAD_SHA:=$(shell git rev-parse --short HEAD)
Expand Down
6 changes: 0 additions & 6 deletions gocd/templates/bash/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ eval "$(/devinfra/scripts/regions/project_env_vars.py --region="${SENTRY_REGION}
--image="us-central1-docker.pkg.dev/sentryio/seer/image:${GO_REVISION_SEER_REPO}" \
--container-name="seer"

/devinfra/scripts/k8s/k8stunnel \
&& /devinfra/scripts/k8s/k8s-deploy.py \
--label-selector="service=seer-gpu" \
--image="us-central1-docker.pkg.dev/sentryio/seer/image:${GO_REVISION_SEER_REPO}" \
--container-name="seer-gpu"

/devinfra/scripts/k8s/k8stunnel \
&& /devinfra/scripts/k8s/k8s-deploy.py \
--label-selector="service=seer-autofix" \
Expand Down
9 changes: 8 additions & 1 deletion grpcserver.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
#!/bin/bash

BOOTSTRAP_BIN="/usr/local/td-grpc-bootstrap"
CMD="python -m seer.grpc"

if [ ! -f $BOOTSTRAP_BIN ]; then
echo "Bootstrap command not found!"
exit 0
fi
${BOOTSTRAP_BIN} --config-mesh-experimental "${MESH_ID}" > "${GRPC_XDS_BOOTSTRAP}"

if [ "$GRPC_SERVER_ENABLE" = "true" ]; then
if [ "$DEV" = "true" ] || [ "$DEV" = "1" ]; then
exec watchmedo auto-restart -d src -p '*.py' --recursive -- $CMD
exec watchmedo auto-restart -d src -p '*.py' --recursive -- "${CMD}"
else
exec $CMD
fi
Expand Down
2 changes: 1 addition & 1 deletion gunicorn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ if [ "$DEV" = "true" ] || [ "$DEV" = "1" ]; then
GUNICORN_ARGS="--reload"
fi

exec gunicorn --bind :$PORT --worker-class sync --threads 1 --timeout 0 --logger-class src.seer.logging.GunicornHealthCheckFilterLogger --access-logfile - 'src.seer.app:start_app()' $GUNICORN_ARGS
exec gunicorn --bind :$PORT --worker-class sync --threads 1 --timeout 0 --logger-class seer.logging.GunicornHealthCheckFilterLogger --access-logfile - 'seer.app:start_app()' $GUNICORN_ARGS
3 changes: 2 additions & 1 deletion requirements-constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ chromadb==0.4.14
google-cloud-storage==2.*
google-cloud-aiplatform==1.*
google-cloud-secret-manager==2.*
anthropic[vertex]==0.31.2
anthropic[vertex]==0.34.2
langfuse @ git+https://github.com/jennmueng/langfuse-python.git@9d9350de1e4e84fa548fe84f82c1b826be17956e
watchdog
stumpy==1.13.0
Expand All @@ -112,3 +112,4 @@ protobuf>=5.27.3
proto-plus>=1.24.0
grpcio-health-checking>=1.66
grpcio-reflection>=1.66
prophet==1.1.*
77 changes: 48 additions & 29 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#
# pip-compile --output-file=requirements.txt --strip-extras requirements-constraints.txt
#
aiohappyeyeballs==2.4.0
aiohappyeyeballs==2.4.3
# via aiohttp
aiohttp==3.10.6
aiohttp==3.10.9
# via
# -r requirements-constraints.txt
# datasets
Expand All @@ -21,7 +21,7 @@ amqp==5.2.0
# via kombu
annotated-types==0.7.0
# via pydantic
anthropic==0.31.2
anthropic==0.34.2
# via -r requirements-constraints.txt
anyio==4.6.0
# via
Expand All @@ -48,7 +48,7 @@ billiard==4.2.1
# via celery
blinker==1.8.2
# via sentry-sdk
build==1.2.2
build==1.2.2.post1
# via pip-tools
cachetools==5.5.0
# via google-auth
Expand Down Expand Up @@ -94,6 +94,8 @@ click-plugins==1.1.1
# via celery
click-repl==0.3.0
# via celery
cmdstanpy==1.2.4
# via prophet
coloredlogs==15.0.1
# via
# onnxruntime
Expand All @@ -106,7 +108,7 @@ convertdate==2.4.0
# via -r requirements-constraints.txt
covdefaults==2.3.0
# via -r requirements-constraints.txt
coverage==7.6.1
coverage==7.6.2
# via
# covdefaults
# pytest-cov
Expand All @@ -120,7 +122,7 @@ cycler==0.11.0
# matplotlib
cython==3.0.2
# via -r requirements-constraints.txt
datasets==3.0.0
datasets==3.0.1
# via optimum
deprecated==1.2.14
# via pygithub
Expand Down Expand Up @@ -177,7 +179,7 @@ fsspec==2023.6.0
# datasets
# huggingface-hub
# torch
google-api-core==2.20.0
google-api-core==2.21.0
# via
# google-cloud-aiplatform
# google-cloud-bigquery
Expand All @@ -195,9 +197,9 @@ google-auth==2.35.0
# google-cloud-resource-manager
# google-cloud-secret-manager
# google-cloud-storage
google-cloud-aiplatform==1.67.1
google-cloud-aiplatform==1.70.0
# via -r requirements-constraints.txt
google-cloud-bigquery==3.25.0
google-cloud-bigquery==3.26.0
# via google-cloud-aiplatform
google-cloud-core==2.4.1
# via
Expand Down Expand Up @@ -230,7 +232,7 @@ grpc-google-iam-v1==0.13.1
# google-cloud-secret-manager
grpc-stubs==1.53.0.5
# via sentry-protos
grpcio==1.66.1
grpcio==1.66.2
# via
# chromadb
# google-api-core
Expand All @@ -241,11 +243,11 @@ grpcio==1.66.1
# grpcio-reflection
# grpcio-status
# sentry-protos
grpcio-health-checking==1.66.1
grpcio-health-checking==1.66.2
# via -r requirements-constraints.txt
grpcio-reflection==1.66.1
grpcio-reflection==1.66.2
# via -r requirements-constraints.txt
grpcio-status==1.66.1
grpcio-status==1.66.2
# via google-api-core
gunicorn==22.0.0
# via -r requirements-constraints.txt
Expand All @@ -254,8 +256,10 @@ h11==0.14.0
# httpcore
# uvicorn
holidays==0.31
# via -r requirements-constraints.txt
httpcore==1.0.5
# via
# -r requirements-constraints.txt
# prophet
httpcore==1.0.6
# via httpx
httptools==0.6.1
# via uvicorn
Expand All @@ -264,7 +268,7 @@ httpx==0.27.2
# anthropic
# langfuse
# openai
huggingface-hub==0.25.1
huggingface-hub==0.25.2
# via
# datasets
# optimum
Expand All @@ -285,9 +289,10 @@ importlib-resources==6.0.1
# via
# -r requirements-constraints.txt
# chromadb
# prophet
iniconfig==2.0.0
# via pytest
isodate==0.6.1
isodate==0.7.2
# via openapi-core
itsdangerous==2.1.2
# via
Expand All @@ -298,7 +303,7 @@ jinja2==3.1.4
# -r requirements-constraints.txt
# flask
# torch
jiter==0.5.0
jiter==0.6.1
# via
# anthropic
# openai
Expand Down Expand Up @@ -348,7 +353,9 @@ markupsafe==2.1.3
# sentry-sdk
# werkzeug
matplotlib==3.9.2
# via seaborn
# via
# prophet
# seaborn
mdurl==0.1.2
# via markdown-it-py
monotonic==1.6
Expand Down Expand Up @@ -386,6 +393,7 @@ numpy==1.26.1
# -r requirements-constraints.txt
# chroma-hnswlib
# chromadb
# cmdstanpy
# contourpy
# datasets
# matplotlib
Expand All @@ -397,21 +405,23 @@ numpy==1.26.1
# pandas-stubs
# patsy
# pgvector
# prophet
# pyarrow
# scikit-learn
# scipy
# seaborn
# sentence-transformers
# shapely
# simdkalman
# stanio
# statsmodels
# stumpy
# transformers
onnx==1.16.0
# via -r requirements-constraints.txt
onnxruntime==1.19.2
# via chromadb
openai==1.47.1
openai==1.51.2
# via -r requirements-constraints.txt
openapi-core==0.18.2
# via -r requirements-constraints.txt
Expand Down Expand Up @@ -446,7 +456,9 @@ packaging==23.2
pandas==2.0.3
# via
# -r requirements-constraints.txt
# cmdstanpy
# datasets
# prophet
# seaborn
# statsmodels
pandas-stubs==2.1.4.231227
Expand All @@ -472,10 +484,14 @@ pip-tools==7.4.1
# via -r requirements-constraints.txt
pluggy==1.5.0
# via pytest
posthog==3.6.6
posthog==3.7.0
# via chromadb
prompt-toolkit==3.0.47
prompt-toolkit==3.0.48
# via click-repl
propcache==0.2.0
# via yarl
prophet==1.1.6
# via -r requirements-constraints.txt
proto-plus==1.24.0
# via
# -r requirements-constraints.txt
Expand Down Expand Up @@ -549,7 +565,7 @@ pyparsing==3.0.9
# matplotlib
pypika==0.48.9
# via chromadb
pyproject-hooks==1.1.0
pyproject-hooks==1.2.0
# via
# build
# pip-tools
Expand Down Expand Up @@ -621,7 +637,7 @@ requests==2.32.2
# transformers
rfc3339-validator==0.1.4
# via openapi-schema-validator
rich==13.8.1
rich==13.9.2
# via typer
rpds-py==0.20.0
# via
Expand Down Expand Up @@ -650,7 +666,7 @@ sentencepiece==0.2.0
# via
# sentence-transformers
# transformers
sentry-protos==0.1.22
sentry-protos==0.1.26
# via -r requirements-constraints.txt
sentry-sdk==2.11.0
# via -r requirements-constraints.txt
Expand All @@ -663,7 +679,6 @@ simdkalman==1.0.2
six==1.16.0
# via
# -r requirements-constraints.txt
# isodate
# patsy
# posthog
# python-dateutil
Expand All @@ -680,6 +695,8 @@ sqlalchemy==2.0.25
# alembic
# flask-sqlalchemy
# pytest-alembic
stanio==0.5.1
# via cmdstanpy
starlette==0.38.6
# via fastapi
statsmodels==0.14.0
Expand Down Expand Up @@ -712,10 +729,12 @@ tqdm==4.66.3
# via
# -r requirements-constraints.txt
# chromadb
# cmdstanpy
# datasets
# huggingface-hub
# nltk
# openai
# prophet
# sentence-transformers
# transformers
transformers==4.37.2
Expand Down Expand Up @@ -791,7 +810,7 @@ urllib3==1.26.19
# pygithub
# requests
# sentry-sdk
uvicorn==0.30.6
uvicorn==0.31.1
# via chromadb
uvloop==0.20.0
# via uvicorn
Expand All @@ -800,7 +819,7 @@ vine==5.1.0
# amqp
# celery
# kombu
watchdog==5.0.2
watchdog==5.0.3
# via -r requirements-constraints.txt
watchfiles==0.24.0
# via uvicorn
Expand All @@ -821,7 +840,7 @@ wrapt==1.16.0
# langfuse
xxhash==3.5.0
# via datasets
yarl==1.12.1
yarl==1.14.0
# via aiohttp

# The following packages are considered to be unsafe in a requirements file:
Expand Down
1 change: 1 addition & 0 deletions src/celery_app/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def setup_periodic_tasks(sender, config: AppConfig = injected, **kwargs):
delete_data_for_ttl.signature(kwargs={}, queue=CeleryQueues.DEFAULT),
name="Delete old Automation runs for 90 day time-to-live",
)

if config.GRPC_SERVER_ENABLE:
from seer.grpc import try_grpc_client

Expand Down
1 change: 1 addition & 0 deletions src/integrations/codecov/codecov_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from seer.configuration import AppConfig
from seer.dependency_injection import inject, injected


class CodecovClient:
@staticmethod
@inject
Expand Down
Loading

0 comments on commit 623c01c

Please sign in to comment.