Skip to content

Commit ceb8a3e

Browse files
committed
fix error reporting of runner
When an error is reported, container.logs() returns an iterator over lines of bytes. The decode() function should apply to each line, not to the iterator, otherwise we get no logs, but an error message saying there is no decode() function in the iterator. This change follows the same pattern as stream_logs() in the same file.
1 parent df8083a commit ceb8a3e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ann_benchmarks/runner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,8 @@ def _handle_container_return_value(
381381
msg = msg.format(exit_code)
382382

383383
if exit_code not in [0, None]:
384-
logger.error(colors.color(container.logs().decode(), fg="red"))
384+
for line in container.logs(stream=True):
385+
logger.error(colors.color(line.decode(), fg="red"))
385386
logger.error(msg)
386387
else:
387388
logger.info(msg)

0 commit comments

Comments
 (0)