mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-09-21 17:00:50 +02:00
feat: add safe distributed checkpoint intake and preflight
This commit is contained in:
@@ -215,6 +215,20 @@ def test_load_json_local_missing_returns_none(tmp_path):
|
||||
assert qd._load_json_from_checkpoint(str(tmp_path), "missing.json") is None
|
||||
|
||||
|
||||
def test_load_json_remote_unexpected_download_failure_returns_none(monkeypatch):
|
||||
def fail_download(*args, **kwargs):
|
||||
raise OSError("offline")
|
||||
|
||||
monkeypatch.setattr("huggingface_hub.hf_hub_download", fail_download)
|
||||
|
||||
assert qd._load_json_from_checkpoint(
|
||||
"org/model",
|
||||
"config.json",
|
||||
revision="immutable-sha",
|
||||
local_files_only=True,
|
||||
) is None
|
||||
|
||||
|
||||
def test_safetensors_key_names_reads_single_file_and_index(tmp_path):
|
||||
from safetensors.torch import save_file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user