routing tests, launch.configs, redirect, stats and route statistics
This commit is contained in:
@@ -37,7 +37,10 @@ def _load_env_file(path: Path) -> None:
|
||||
|
||||
|
||||
def _load_env_defaults() -> None:
|
||||
"""Load local and user-level node env defaults before config defaults are imported."""
|
||||
"""Load machine-specific, local, and user-level node env defaults."""
|
||||
machine = socket.gethostname().strip()
|
||||
if machine:
|
||||
_load_env_file(Path.cwd() / f".env.{machine}")
|
||||
_load_env_file(Path.cwd() / ".env")
|
||||
_load_env_file(Path.home() / ".config" / "meshnet" / "secrets.env")
|
||||
|
||||
@@ -235,13 +238,17 @@ def _cmd_start(args) -> int:
|
||||
if args.tracker:
|
||||
cfg["tracker_url"] = args.tracker
|
||||
cfg["port"] = args.port if args.port is not None else _first_available_port(args.host)
|
||||
model_name, hf_repo = _resolve_model_flags(
|
||||
args.model or cfg.get("model_hf_repo") or cfg.get("model_name") or None,
|
||||
args.model_id,
|
||||
)
|
||||
if model_name is not None:
|
||||
cfg["model_name"] = model_name
|
||||
cfg["model_hf_repo"] = hf_repo or ""
|
||||
if args.no_model:
|
||||
cfg["model_name"] = ""
|
||||
cfg["model_hf_repo"] = ""
|
||||
else:
|
||||
model_name, hf_repo = _resolve_model_flags(
|
||||
args.model or cfg.get("model_hf_repo") or cfg.get("model_name") or None,
|
||||
args.model_id,
|
||||
)
|
||||
if model_name is not None:
|
||||
cfg["model_name"] = model_name
|
||||
cfg["model_hf_repo"] = hf_repo or ""
|
||||
cfg["quantization"] = args.quantization
|
||||
cfg["host"] = args.host
|
||||
if args.shard_start is not None:
|
||||
@@ -357,6 +364,7 @@ def main() -> None:
|
||||
start_cmd.add_argument("--tracker")
|
||||
start_cmd.add_argument("--port", type=int)
|
||||
start_cmd.add_argument("--model", help="Model name or HuggingFace repo ID")
|
||||
start_cmd.add_argument("--no-model", action="store_true", help="Start a registry-only node without loading a model")
|
||||
start_cmd.add_argument("--model-id", help="Alias for --model (catalog name or HuggingFace repo)")
|
||||
start_cmd.add_argument("--shard-start", type=int)
|
||||
start_cmd.add_argument("--shard-end", type=int)
|
||||
|
||||
Reference in New Issue
Block a user