Skip to content

fix: use current oMLX memory guard options - #6

Merged
sg-shag merged 3 commits into
mainfrom
fix/omlx-memory-guard
Oct 19, 2026
Merged

sg-shag merged 3 commits into
mainfrom
fix/omlx-memory-guard

Conversation

@gnezim

@gnezim gnezim commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Summary

TF emits memory flags that current oMLX rejects before startup. Replace them with the native memory guard options in the shared argument builder used by process, LaunchAgent and LaunchDaemon startup.

nodes.<node>.runtime
  memory_guard     -> --memory-guard off|safe|balanced|aggressive
  memory_guard_gb  -> --memory-guard-gb <positive finite GB>
  omitted/null    -> no override; keep oMLX settings/defaults
  obsolete keys   -> config error with migration instructions

Reject invalid tiers, non-finite/non-positive ceilings, booleans and off combined with a custom ceiling. Update the README, example config and tests. No compatibility shim, runtime version negotiation or automatic conversion of old limits: the old model/process caps and new guard have different meanings. Independent of the GPU sysctl change in #5.

Evidence

  • Before: TF's generated --max-model-memory 90GB --max-process-memory auto command exits 2 with unrecognized arguments in oMLX v0.7.1rc1's parser. TF's command without the old options is accepted.
    After: all seven generated option combinations pass that same parser. This executes the unchanged upstream parser functions with the server entrypoint stubbed; it does not load models or start inference.
  • Regression tests failed before implementation: current settings were silently ignored and obsolete keys were accepted. Afterward, 97 focused tests pass, covering config validation and generated process/user/system launchd arguments.
  • make dev-lint and git diff --check pass.
  • make dev-check: 362 passed, 1 failed using an ignored copy of tfconfig.example.yaml. The existing test_cluster_status_reports_inference_health expects 13G, while the example config supplies 11G. The same failure was reproduced from unchanged main at b458a4e.

Merge Danger

Door: two-way

Existing configs containing max_model_memory or max_process_memory, even null values, must remove those keys and explicitly choose the new settings. Quote "off" in YAML. A custom GB ceiling enables the guard and overrides a tier; it cannot accompany "off". No config migration is performed automatically.

Blast Radius: runtime-startup

Requires an oMLX build supporting these guard flags; verified against v0.7.1rc1. Affects generated startup commands, not host sysctl policy. No live-node restart, model load or inference-memory validation was performed.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 80109909-e988-4b98-ab43-ebe4c78614e6
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sg-shag
sg-shag merged commit 93291e8 into main Oct 19, 2026
0 of 2 checks passed
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.

2 participants