5-th DL fix
This commit is contained in:
@@ -332,6 +332,7 @@ def run_startup(
|
||||
vram_mb_override: int | None = None,
|
||||
max_loaded_shards: int = 1,
|
||||
debug: bool = False,
|
||||
tracker_source_disabled: bool = False,
|
||||
) -> StubNodeServer | TorchNodeServer:
|
||||
"""Execute the full startup sequence and return a running node server.
|
||||
|
||||
@@ -458,7 +459,10 @@ def run_startup(
|
||||
if net_asgn.get("hf_repo") == model_id and net_asgn.get("gap_found"):
|
||||
shard_start = net_asgn["shard_start"]
|
||||
shard_end = net_asgn["shard_end"]
|
||||
full_sources = _full_model_sources(net_asgn.get("model_sources", []))
|
||||
full_sources = (
|
||||
[] if tracker_source_disabled
|
||||
else _full_model_sources(net_asgn.get("model_sources", []))
|
||||
)
|
||||
if full_sources:
|
||||
cache_dir = download_shard(
|
||||
model_id.split("/")[-1],
|
||||
@@ -588,7 +592,7 @@ def run_startup(
|
||||
f"(of {assigned_num_layers})",
|
||||
flush=True,
|
||||
)
|
||||
full_sources = _full_model_sources(assigned_model_sources)
|
||||
full_sources = [] if tracker_source_disabled else _full_model_sources(assigned_model_sources)
|
||||
if full_sources:
|
||||
print("Downloading assigned model snapshot...", flush=True)
|
||||
cache_dir = download_shard(
|
||||
@@ -676,7 +680,10 @@ def run_startup(
|
||||
assign_qs = urllib.parse.urlencode({
|
||||
"model": model,
|
||||
"device": device,
|
||||
"vram_mb": vram_mb,
|
||||
# CPU-mode nodes must be sized by RAM: a detected-but-unusable GPU's
|
||||
# VRAM would otherwise cap the shard (e.g. 8 GB VRAM → 3 layers on a
|
||||
# 79 GB box whose Torch has no CUDA).
|
||||
"vram_mb": assignment_vram_mb,
|
||||
"ram_mb": ram_mb,
|
||||
})
|
||||
try:
|
||||
@@ -690,7 +697,7 @@ def run_startup(
|
||||
assigned_model: str = assignment.get("model", model)
|
||||
hf_repo: str | None = assignment.get("hf_repo")
|
||||
peers: list[dict] = assignment.get("peers", [])
|
||||
model_sources: list[dict] = assignment.get("model_sources", [])
|
||||
model_sources: list[dict] = [] if tracker_source_disabled else assignment.get("model_sources", [])
|
||||
print(f" Shard: layers {shard_start}-{shard_end} of {assigned_model}", flush=True)
|
||||
|
||||
# 4. Download shard
|
||||
|
||||
Reference in New Issue
Block a user