We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66d8365 commit ef73e4dCopy full SHA for ef73e4d
1 file changed
src/humanloop/eval_utils/run.py
@@ -196,14 +196,16 @@ def increment(self):
196
time_per_item = elapsed_time / self._progress if self._progress > 0 else 0
197
eta = (self._total - self._progress) * time_per_item
198
199
- progress_display = f"\r[{bar}] {self._progress}/{self._total}"
+ progress_display = f"[{bar}] {self._progress}/{self._total}"
200
progress_display += f" ({percentage:.2f}%)"
201
202
if self._progress < self._total:
203
progress_display += f" | ETA: {int(eta)}s"
204
else:
205
progress_display += " | DONE"
206
207
+ sys.stderr.write("\r") # Move the cursor to the beginning of the line
208
+ sys.stderr.write("\033[K") # Clear the line from the cursor to the end
209
sys.stderr.write(progress_display)
210
211
if self._progress >= self._total:
0 commit comments