- Reorder PROFILES in step_hardware.py, _WIZARD_PROFILES in dev-api.py, and <option> elements in WizardHardwareStep.vue: cpu → single-gpu → dual-gpu → cf-orch → remote - _suggest_profile() now defaults to "cpu" instead of "remote" when no local GPUs detected - Update no-GPU hint text to remove "Remote" from suggested options - Add nvidia GPU device reservation to compose.wizard-test.yml so the wizard test instance can run nvidia-smi and detect host GPUs - Switch wizard-test compose to use ghcr.io/circuitforgellc/peregrine:latest (same image as main compose, avoids stale peregrine-api tag drift)
14 lines
535 B
Python
14 lines
535 B
Python
"""Step 1 — Hardware detection and inference profile selection."""
|
|
|
|
PROFILES = ["cpu", "single-gpu", "dual-gpu", "cf-orch", "remote"]
|
|
|
|
|
|
def validate(data: dict) -> list[str]:
|
|
"""Return list of validation errors. Empty list = step passes."""
|
|
errors = []
|
|
profile = data.get("inference_profile", "")
|
|
if not profile:
|
|
errors.append("Inference profile is required.")
|
|
elif profile not in PROFILES:
|
|
errors.append(f"Invalid inference profile '{profile}'. Choose: {', '.join(PROFILES)}.")
|
|
return errors
|