studio: fix two backend CI test failures (capability dict + MTP recovery race) (#6464)
test_safetensors_capability_advertise: detect_reasoning_flags now returns a reasoning_effort_levels key, so the none-template expectation must include it. test_tensor_parallel::test_runtime_recovery_reloads_without_mtp: the assertion raced the recovery thread, which sets _spec_fallback_reason just before its finally clears _mtp_runtime_fallback_in_progress. Wait for the flag to clear before asserting. Co-authored-by: danielhanchen <michaelhan2050@gmail.com>
This commit is contained in:
parent
66e4568c2c
commit
b552f2fbc8
2 changed files with 6 additions and 0 deletions
|
|
@ -107,6 +107,7 @@ def test_detect_safetensors_features_none_template_returns_all_false():
|
|||
"supports_reasoning": False,
|
||||
"reasoning_style": "enable_thinking",
|
||||
"reasoning_always_on": False,
|
||||
"reasoning_effort_levels": [],
|
||||
"supports_preserve_thinking": False,
|
||||
"supports_tools": False,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -365,6 +365,11 @@ def test_runtime_recovery_reloads_without_mtp(monkeypatch):
|
|||
while b._spec_fallback_reason != "runtime_error" and time.monotonic() < deadline:
|
||||
time.sleep(0.02)
|
||||
assert b._spec_fallback_reason == "runtime_error"
|
||||
# The reload thread clears the single-flight flag in its finally, a beat after
|
||||
# it sets the fallback reason -- wait for that instead of racing the thread.
|
||||
deadline = time.monotonic() + 2
|
||||
while b._mtp_runtime_fallback_in_progress and time.monotonic() < deadline:
|
||||
time.sleep(0.02)
|
||||
assert b._mtp_runtime_fallback_in_progress is False
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue