mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-18 05:23:57 +08:00
v16
This commit is contained in:
@@ -48,6 +48,7 @@ MODEL_CONTEXT_FREQ = 5
|
|||||||
REPOSITORY_FILE_LIMIT = 100_000_000
|
REPOSITORY_FILE_LIMIT = 100_000_000
|
||||||
DEFAULT_MULTIPART_SIZE = 95 * 1024 * 1024
|
DEFAULT_MULTIPART_SIZE = 95 * 1024 * 1024
|
||||||
USBGPU_PROBE_ATTEMPTS = 10
|
USBGPU_PROBE_ATTEMPTS = 10
|
||||||
|
DEFAULT_SUPERCOMBO_BEHAVIOR_VERSION = "v16"
|
||||||
|
|
||||||
|
|
||||||
def build_compile_env(*, supercombo: bool = False) -> dict[str, str]:
|
def build_compile_env(*, supercombo: bool = False) -> dict[str, str]:
|
||||||
@@ -280,6 +281,13 @@ def infer_model_version(model_key: str, explicit_version: str | None) -> str:
|
|||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_behavior_version(model_key: str, explicit_version: str | None, input_format: str) -> str:
|
||||||
|
version = infer_model_version(model_key, explicit_version)
|
||||||
|
if not version and input_format == "supercombo":
|
||||||
|
return DEFAULT_SUPERCOMBO_BEHAVIOR_VERSION
|
||||||
|
return version
|
||||||
|
|
||||||
|
|
||||||
def select_input_format(requested: str, files: dict[str, Path]) -> str:
|
def select_input_format(requested: str, files: dict[str, Path]) -> str:
|
||||||
if requested == "supercombo":
|
if requested == "supercombo":
|
||||||
if "driving_supercombo" not in files:
|
if "driving_supercombo" not in files:
|
||||||
@@ -661,9 +669,7 @@ def main() -> int:
|
|||||||
source_path = Path(source)
|
source_path = Path(source)
|
||||||
validate_onnx_source(source_path)
|
validate_onnx_source(source_path)
|
||||||
print(f" source {option.removeprefix('--')}: {source_path} ({source_path.stat().st_size} bytes)")
|
print(f" source {option.removeprefix('--')}: {source_path} ({source_path.stat().st_size} bytes)")
|
||||||
version = infer_model_version(model_key, args.version)
|
version = resolve_behavior_version(model_key, args.version, input_format)
|
||||||
if not version and input_format == "supercombo":
|
|
||||||
version = "v15"
|
|
||||||
version_label = version or "unspecified behavior"
|
version_label = version or "unspecified behavior"
|
||||||
will_install = model_key.startswith("local-") and not args.no_install
|
will_install = model_key.startswith("local-") and not args.no_install
|
||||||
target = f"{args.output_dir}" + (f" -> {MODELS_PATH} (auto-install)" if will_install else "")
|
target = f"{args.output_dir}" + (f" -> {MODELS_PATH} (auto-install)" if will_install else "")
|
||||||
|
|||||||
@@ -50,6 +50,12 @@ def test_behavior_version_does_not_control_artifact_layout():
|
|||||||
assert manager._required_files("example", "split") == []
|
assert manager._required_files("example", "split") == []
|
||||||
|
|
||||||
|
|
||||||
|
def test_supercombo_defaults_to_v16_without_changing_split_defaults():
|
||||||
|
assert model_compiler.resolve_behavior_version("new-model", None, "supercombo") == "v16"
|
||||||
|
assert model_compiler.resolve_behavior_version("legacy-model", None, "split") == ""
|
||||||
|
assert model_compiler.resolve_behavior_version("new-model", "v15", "supercombo") == "v15"
|
||||||
|
|
||||||
|
|
||||||
def test_external_gpu_requirement_is_cached_from_manifest(tmp_path, monkeypatch):
|
def test_external_gpu_requirement_is_cached_from_manifest(tmp_path, monkeypatch):
|
||||||
monkeypatch.setattr(model_manager, "MODELS_PATH", tmp_path)
|
monkeypatch.setattr(model_manager, "MODELS_PATH", tmp_path)
|
||||||
manager = object.__new__(ModelManager)
|
manager = object.__new__(ModelManager)
|
||||||
|
|||||||
Reference in New Issue
Block a user