Skip to content

armgit / Soup

Public Imported from GitHub
0

Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.

test: fix two CI timing flakes (the Lambda SIGINT ready race, the Langfuse drip deadline) (#1369)

Alpamys Makazhan1cfbd7adeab7
diff --git a/tests/test_issue865_langfuse_pull_bounds.py b/tests/test_issue865_langfuse_pull_bounds.py
index 31285501..69be5043 100644
--- a/tests/test_issue865_langfuse_pull_bounds.py
+++ b/tests/test_issue865_langfuse_pull_bounds.py
@@ -33,8 +33,12 @@ _SECRET = "sk-lf-SOUP865SECRET-3c4d"
# inside the timeout, the total is far past it.
_TIMEOUT = 0.4
_DRIP_GAP = 0.1
-_DRIP_CHUNKS = 20
-_EPSILON = 0.6 # scheduling slack on a loaded CI runner
+_DRIP_CHUNKS = 40
+# Scheduling slack on a loaded CI runner. 0.6 s was not enough on windows-latest:
+# a deadline that fired correctly still measured 1.05 s and 1.22 s end to end on
+# 2026-09-27/28. The bound stays a full second below the undefended drip
+# (_DRIP_CHUNKS * _DRIP_GAP = 4 s), so a missing deadline still fails it.
+_EPSILON = 1.6
def _creds(host="https://cloud.langfuse.com"):
diff --git a/tests/test_lambda_submit_interrupt.py b/tests/test_lambda_submit_interrupt.py
index cab6de3c..4799bd7e 100644
--- a/tests/test_lambda_submit_interrupt.py
+++ b/tests/test_lambda_submit_interrupt.py
@@ -278,8 +278,14 @@ import os
import pathlib
import time
-pathlib.Path("ready").write_text("ready")
try:
+ # Readiness is announced from INSIDE the try, and atomically. `exists()`
+ # turns true the moment write_text creates the file, so a "ready" written
+ # before the try let the test's SIGINT land inside write_text, raise there,
+ # and skip the finally below: a missing marker that no parent caused.
+ ready = pathlib.Path("ready.tmp")
+ ready.write_text("ready")
+ os.replace(ready, "ready")
while True:
time.sleep(0.1)
finally: