Skip to content

Commit

Permalink
Merge pull request #1880 from Agenta-AI/filter-out-evaluations-with-n…
Browse files Browse the repository at this point in the history
…ull-testsets

Filter out evaluations with null testsets
  • Loading branch information
aakrem committed Jul 12, 2024
2 parents c446009 + f11062e commit bac8b35
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion agenta-backend/agenta_backend/services/db_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1973,7 +1973,11 @@ async def list_human_evaluations(app_id: str):
"""

async with db_engine.get_session() as session:
base_query = select(HumanEvaluationDB).filter_by(app_id=uuid.UUID(app_id))
base_query = (
select(HumanEvaluationDB)
.filter_by(app_id=uuid.UUID(app_id))
.filter(HumanEvaluationDB.testset_id.isnot(None))
)
if isCloudEE():
query = base_query.options(
joinedload(HumanEvaluationDB.user.of_type(UserDB)).load_only(UserDB.id, UserDB.username), # type: ignore
Expand Down

0 comments on commit bac8b35

Please sign in to comment.