Skip to content

Commit bac8b35

Browse files
authored
Merge pull request #1880 from Agenta-AI/filter-out-evaluations-with-null-testsets
Filter out evaluations with null testsets
2 parents c446009 + f11062e commit bac8b35

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

agenta-backend/agenta_backend/services/db_manager.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1973,7 +1973,11 @@ async def list_human_evaluations(app_id: str):
19731973
"""
19741974

19751975
async with db_engine.get_session() as session:
1976-
base_query = select(HumanEvaluationDB).filter_by(app_id=uuid.UUID(app_id))
1976+
base_query = (
1977+
select(HumanEvaluationDB)
1978+
.filter_by(app_id=uuid.UUID(app_id))
1979+
.filter(HumanEvaluationDB.testset_id.isnot(None))
1980+
)
19771981
if isCloudEE():
19781982
query = base_query.options(
19791983
joinedload(HumanEvaluationDB.user.of_type(UserDB)).load_only(UserDB.id, UserDB.username), # type: ignore

0 commit comments

Comments
 (0)