mirror of https://github.com/razor-ai/soup.git
test(local-rl): de-flake stamp-before-train concurrent-thumbs test on Windows
Pre-existing v0.71.13 test flaked on windows-latest CI: record_thumb stamps time.time() and count_new_thumbs_since uses strict `>`, so on Windows' ~15.6ms clock resolution the two mid-train thumbs could land in the same tick as run_started (ts == run_started, dropped). Sleep one clock tick at the start of slow_train so the thumbs are strictly later. Prod semantics unchanged; tests-only.
This commit is contained in:
parent
85f42029fb
commit
cb1fa2e69f
|
|
@ -1144,7 +1144,13 @@ class TestReviewFixes:
|
||||||
)
|
)
|
||||||
|
|
||||||
def slow_train(*, base_model, pairs_path, output_dir, train_method):
|
def slow_train(*, base_model, pairs_path, output_dir, train_method):
|
||||||
# Simulate a thumb landing mid-train.
|
# Simulate a thumb landing mid-train. Sleep one clock tick first so
|
||||||
|
# the thumbs' time.time() ts is strictly greater than run_started on
|
||||||
|
# coarse-resolution clocks (Windows time.time() ~15.6ms) — otherwise
|
||||||
|
# a same-tick ts == run_started is dropped by the strict `>` count.
|
||||||
|
import time as _t
|
||||||
|
|
||||||
|
_t.sleep(0.05)
|
||||||
record_thumb(
|
record_thumb(
|
||||||
db_path="db.sqlite", prompt="qZ", response="x", thumb="up"
|
db_path="db.sqlite", prompt="qZ", response="x", thumb="up"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue