MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / _infer_arch

Function _infer_arch

analysis/loader.py:342–355  ·  view source on GitHub ↗
(details: dict[str, Any], source_path: Path)

Source from the content-addressed store, hash-verified

340
341
342def _infer_arch(details: dict[str, Any], source_path: Path) -> str:
343 arch = str(
344 details.get("architecture")
345 or _as_dict(details.get("extras")).get("architecture")
346 or _as_dict(details.get("extras")).get("arch")
347 or ""
348 )
349 if arch:
350 return arch
351
352 stem_parts = source_path.stem.split("_")
353 if len(stem_parts) >= 3:
354 return stem_parts[-1]
355 return ""
356
357
358def _canonicalize_model_alias(value: Any) -> str:

Callers 1

_normalize_task_resultFunction · 0.85

Calls 1

_as_dictFunction · 0.85

Tested by

no test coverage detected