fix: GPU 로 모델을 못 올려도 CPU 로 시작 · cuBLAS 받는 중 정지하면 캡처를 켜지 않게
Some checks failed
Windows / verify (push) Has been cancelled
Some checks failed
Windows / verify (push) Has been cancelled
- preload_on_start(기본값)에서 모델 로드가 GPU 오류를 내면 ERROR 로 끝나던 것을, CPU 로 바꿔 다시 올리게 했다. - cuBLAS 를 받는 중에 정지하면 받기는 계속되고, 끝난 뒤 캡처가 켜져 상태가 다시 RUNNING 이 되던 것을 고쳤다. 시작 작업마다 전용 정지 이벤트를 넘기고, 받기는 그 이벤트를 보고 멈추며, 시작 작업은 정지된 뒤에는 캡처·상태를 건드리지 않는다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -59,3 +59,18 @@ def test_ensure_is_a_no_op_off_windows_or_on_cpu(monkeypatch):
|
||||
assert cuda_runtime.ensure(device="cuda") is False
|
||||
monkeypatch.setattr(cuda_runtime.sys, "platform", "win32")
|
||||
assert cuda_runtime.ensure(device="cpu") is False
|
||||
|
||||
|
||||
def test_download_stops_when_cancelled(tmp_path):
|
||||
import threading
|
||||
|
||||
url, sha, size = _fake_wheel(tmp_path)
|
||||
target = tmp_path / "runtime"
|
||||
cancel = threading.Event()
|
||||
cancel.set()
|
||||
|
||||
with pytest.raises(cuda_runtime.DownloadCancelled):
|
||||
cuda_runtime.download(target, None, url, sha, size, cancel=cancel)
|
||||
|
||||
assert not cuda_runtime.installed(target)
|
||||
assert list(target.iterdir()) == []
|
||||
|
||||
Reference in New Issue
Block a user