This commit is contained in:
Adil Hafeez 2024-10-30 14:35:51 -07:00
parent 45e03ad0c0
commit ee89c6cb38
12 changed files with 151 additions and 137 deletions

16
e2e_tests/poetry.lock generated
View file

@ -455,13 +455,13 @@ files = [
[[package]]
name = "pytest"
version = "7.4.4"
version = "8.3.3"
description = "pytest: simple powerful testing with Python"
optional = false
python-versions = ">=3.7"
python-versions = ">=3.8"
files = [
{file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"},
{file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"},
{file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"},
{file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"},
]
[package.dependencies]
@ -469,11 +469,11 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""}
exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
iniconfig = "*"
packaging = "*"
pluggy = ">=0.12,<2.0"
tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
pluggy = ">=1.5,<2"
tomli = {version = ">=1", markers = "python_version < \"3.11\""}
[package.extras]
testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
[[package]]
name = "pytest-cov"
@ -716,4 +716,4 @@ h11 = ">=0.9.0,<1"
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
content-hash = "a5a13987eab6bb15765c050d6a7aaf3b0d0cf661eedb129d6b811d654880a3cb"
content-hash = "a40015b90325879e50f82cca6a26a730d763cad26589671df798832d41c42db3"

View file

@ -9,7 +9,7 @@ package-mode = false
[tool.poetry.dependencies]
python = "^3.10"
pytest = "^7.3.1"
pytest = "^8.3.3"
requests = "^2.29.0"
selenium = "^4.11.2"
pytest-sugar = "^1.0.0"

View file

@ -21,65 +21,69 @@ trap 'print_debug' INT TERM ERR
log starting > ../build.log
log building and running function_callling demo
log ===============================
log ===========================================
cd ../demos/function_calling
docker compose up api_server --build -d
cd -
print_disk_usage
# log building model server
# log =====================
# cd ../model_server
# poetry install 2>&1 >> ../build.log
# print_disk_usage
# log starting model server
# log =====================
# mkdir -p ~/archgw_logs
# touch ~/archgw_logs/modelserver.log
# poetry run archgw_modelserver restart &
# tail -F ~/archgw_logs/modelserver.log &
# model_server_tail_pid=$!
# cd -
log building model server
log =====================
cd ../model_server
poetry install 2>&1 >> ../build.log
print_disk_usage
log starting model server
log =====================
mkdir -p ~/archgw_logs
touch ~/archgw_logs/modelserver.log
poetry run archgw_modelserver restart &
tail -F ~/archgw_logs/modelserver.log &
model_server_tail_pid=$!
poetry install
cd -
log building llm and prompt gateway rust modules
log ============================================
log building archgw cli
log ===================
cd ../arch/tools
sh build_cli.sh
cd -
log building docker image for arch gateway
log ======================================
cd ../arch
print_disk_usage
docker build -f Dockerfile .. -t katanemo/archgw -q
print_disk_usage
log starting the arch gateway service
log =================================
docker compose -f docker-compose.e2e.yaml down
log waiting for model service to be healthy
wait_for_healthz "http://localhost:51000/healthz" 300
sh build_filter_image.sh
cd -
log startup arch gateway with function calling demo
cd ..
touch ~/archgw_logs/modelserver.log
tail -F ~/archgw_logs/modelserver.log &
model_server_tail_pid=$!
archgw down
archgw up demos/function_calling/arch_config.yaml
kill $model_server_tail_pid
docker compose -f docker-compose.e2e.yaml up -d
log waiting for arch gateway service to be healthy
wait_for_healthz "http://localhost:10000/healthz" 60
log waiting for arch gateway service to be healthy
cd -
log running e2e tests
log =================
poetry install 2>&1 >> ../build.log
poetry install
poetry run pytest
log shutting down the arch gateway service
log ======================================
cd ../arch
docker compose -f docker-compose.e2e.yaml stop 2>&1 >> ../build.log
cd ../
archgw down
cd -
log shutting down the function_calling demo
log =======================================
cd ../demos/function_calling
docker compose down 2>&1 >> ../build.log
cd -
log shutting down the model server
log ==============================
cd ../model_server
poetry run archgw_modelserver stop 2>&1 >> ../build.log
docker compose down
cd -