Skip to content

Commit 03038ee

Browse files
author
Andrei Bratu
committed
Fix polling with no wait time
1 parent c78906d commit 03038ee

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "humanloop"
33

44
[tool.poetry]
55
name = "humanloop"
6-
version = "0.8.25"
6+
version = "0.8.26"
77
description = ""
88
readme = "README.md"
99
authors = []

src/humanloop/eval_utils/run.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ def handle_exit_signal(signum, frame):
308308
def _process_datapoint(dp: Datapoint):
309309
def upload_callback(log_id: str):
310310
"""Logic ran after the Log has been created."""
311+
# Need to get the full log to pass to the evaluators
311312
evaluators_worker_pool.submit(
312313
_run_local_evaluators,
313314
client=client,
@@ -901,11 +902,6 @@ def _run_local_evaluators(
901902
progress_bar: _SimpleProgressBar,
902903
):
903904
"""Run local Evaluators on the Log and send the judgments to Humanloop."""
904-
# If there are no local evaluators, we don't need to do the log lookup.
905-
if len(local_evaluators) == 0:
906-
progress_bar.increment()
907-
return
908-
909905
try:
910906
# Need to get the full log to pass to the evaluators
911907
log = client.logs.get(id=log_id)
@@ -915,7 +911,9 @@ def _run_local_evaluators(
915911
log_dict = log
916912

917913
# Wait for the Flow trace to complete before running evaluators
918-
while file_type == "flow" and log_dict["trace_status"] != "complete":
914+
while True:
915+
if file_type != "flow" or log_dict["trace_status"] == "complete":
916+
break
919917
log = client.logs.get(id=log_id)
920918
if not isinstance(log, dict):
921919
log_dict = log.dict()

0 commit comments

Comments
 (0)