Skip to content

Commit

Permalink
Merge pull request #1370 from Agenta-AI/feature/improve-error-handlin…
Browse files Browse the repository at this point in the history
…g-evaluation

Add assertion for app variant not found
  • Loading branch information
mmabrouk authored Feb 15, 2024
2 parents 89bbaef + bbb1789 commit 391d48a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions agenta-backend/agenta_backend/tasks/evaluations.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ def evaluate(
loop.run_until_complete(DBEngine().init_db())
app = loop.run_until_complete(fetch_app_by_id(app_id))
app_variant_db = loop.run_until_complete(fetch_app_variant_by_id(variant_id))
assert (
app_variant_db is not None
), f"App variant with id {variant_id} not found!"
app_variant_parameters = app_variant_db.config.parameters
testset_db = loop.run_until_complete(fetch_testset_by_id(testset_id))
new_evaluation_db = loop.run_until_complete(
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:
"--log-level",
"info",
"--root-path",
"/api",
"/api"
]
labels:
- "traefik.http.routers.backend.rule=PathPrefix(`/api/`)"
Expand Down Expand Up @@ -132,6 +132,7 @@ services:
depends_on:
- rabbitmq
- redis
- mongo
extra_hosts:
- host.docker.internal:host-gateway
networks:
Expand Down

0 comments on commit 391d48a

Please sign in to comment.