feat(us-021): --route-timeout CLI flag for node tracker route lookup

Default 30s replaces the hardcoded 5s. Wired through TorchNodeServer →
_TorchHTTPServer → _get_remaining_route. Available on both the legacy
`start` subcommand and the default wizard path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dobromir Popov
2026-06-30 13:06:00 +03:00
parent c691e8d5d1
commit e1ba120912
3 changed files with 17 additions and 1 deletions

View File

@@ -111,6 +111,7 @@ def run_startup(
host: str = "127.0.0.1",
advertise_host: str | None = None,
contracts: Any | None = None,
route_timeout: float = 30.0,
) -> StubNodeServer | TorchNodeServer:
"""Execute the full startup sequence and return a running node server.
@@ -202,6 +203,7 @@ def run_startup(
shard_end=shard_end,
quantization=quantization,
tracker_url=tracker_url,
route_timeout=route_timeout,
)
actual_port = node.start()
total_layers = getattr(getattr(node, "backend", None), "total_layers", None)
@@ -285,6 +287,7 @@ def run_startup(
shard_end=assigned_shard_end,
quantization=quantization,
tracker_url=tracker_url,
route_timeout=route_timeout,
)
actual_port = node.start()
public_host = advertise_host or (socket.getfqdn() if host == "0.0.0.0" else host)