Skip to content

Commit

Permalink
suppress unhelpful logging of "No previous versions to compare with."…
Browse files Browse the repository at this point in the history
… * number of evaluators when there's only one evaluatee
  • Loading branch information
harry-humanloop committed Oct 16, 2024
1 parent 5ef02c9 commit 09df61f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/humanloop/eval_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def process_datapoint(datapoint: Datapoint):

# Wait for the Evaluation to complete then print the results
complete = False
stats = None

while not complete:
stats = client.evaluations.get_stats(id=evaluation.id)
logger.info(f"\r{stats.progress}")
Expand All @@ -410,6 +410,10 @@ def process_datapoint(datapoint: Datapoint):
logger.info(stats.report)

checks: List[EvaluatorCheck] = []
if all(evaluator.get("threshold") is None for evaluator in evaluators) and len(stats.version_stats) == 1:
# Skip `check_evaluation_improvement` if no thresholds were provided and there is only one run.
# (Or the logs would not be helpful)
return checks
for evaluator in evaluators:
improvement_check, score, delta = check_evaluation_improvement(
evaluation=evaluation,
Expand Down

0 comments on commit 09df61f

Please sign in to comment.