Skip to content

fix(select-model): allow float values for ram-gb and vram-mb in select-model.py - #5561

Open
vaibhavsrv wants to merge 1 commit into
Osmantic:public-betafrom
vaibhavsrv:fix/select-model-float-ram-arg
Open

vaibhavsrv wants to merge 1 commit into
Osmantic:public-betafrom
vaibhavsrv:fix/select-model-float-ram-arg

Conversation

@vaibhavsrv

Copy link
Copy Markdown
Contributor

Why this matters

In ods/scripts/select-model.py, --ram-gb and --vram-mb arguments were registered with type=int. When hardware detection tools passed fractional memory readings (such as 15.8 on 16GB systems with reserved regions), argparse threw an unhandled parse error and exited with status 2.

Change argument types to type=float, matching the internal float arithmetic used by usable_memory_gb() and matching_runtime_profile().

Validation

  • Baseline reproduction: select-model.py ... --ram-gb 15.8 crashed with error: argument --ram-gb: invalid int value: '15.8'.
  • Post-fix: test_select_model_float_ram_args.py runs with float memory arguments and verifies successful model recommendation.
  • Model selection suites: 1 passed. Ruff and diff checks pass; regression wired into Linux CI.

Overlap check

Searched live open/closed PRs by select-model.py. #5372 touches model identity during streams; this hardens CLI memory argument conversion.

Risk / AI disclosure

AI-assisted investigation, implementation and CLI regressions. This strengthens CLI argument type conversion. Independent review remains a gate.

Follow-up integration evidence

Composed with #5372 at 3c186f3 without conflicts. Model selection contracts remain intact.
Backlog composition was local-only (production/test diffs, excluding workflow/Makefile wiring); it is not an upstream merge or independent human approval. Declared live-review gates remain open.

@vaibhavsrv
vaibhavsrv force-pushed the fix/select-model-float-ram-arg branch from 2b8854e to 57f6f45 Compare September 17, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant