Skip to content

fix(tests): update Scheduler/Memory to_dict expectations for new fields#1286

Merged
jundot merged 1 commit into
jundot:mainfrom
mvanhorn:fix/1259-update-scheduler-memory-to-dict-expectations-for-n
May 19, 2026
Merged

fix(tests): update Scheduler/Memory to_dict expectations for new fields#1286
jundot merged 1 commit into
jundot:mainfrom
mvanhorn:fix/1259-update-scheduler-memory-to-dict-expectations-for-n

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Summary

SchedulerSettings.to_dict() and MemorySettings.to_dict() emit several fields (chunked_prefill, soft_threshold, hard_threshold) that their corresponding tests in tests/test_settings.py didn't include in the expected dict. The tests fail locally against current defaults. Updates the expected dicts to match the implementation.

Why this matters

#1259 surfaced the staleness in passing. Test failures in this area mask any real regression in the settings serialization path.

Changes

  • tests/test_settings.py - update to_dict expectations for SchedulerSettings and MemorySettings to include the missing fields.

Testing

Tests pass locally after the update; no other test changes needed.

Fixes #1259

Test assertions for SchedulerSettings.to_dict and MemorySettings.to_dict
omitted the chunked_prefill, soft_threshold, and hard_threshold fields
that the to_dict implementations already emit. The tests would fail
the moment anyone ran them locally with the current defaults. Update
the expected dicts to match the current implementation.

Fixes jundot#1259
panwudi pushed a commit to panwudi/flyto-mlx that referenced this pull request May 18, 2026
Failures pre-date this branch (upstream issue jundot#1259 cluster) but were not
covered by upstream jundot#1268/jundot#1286/jundot#1287 because they track flyto's own
divergence:
- model_profiles: classify dflash_max_concurrent / dflash_kv_pressure_threshold
  (flyto dflash Path A fields, beyond upstream jundot#1268's 9)
- test_omlx_app: server_manager auto-restart cap was lifted 3 -> 10000
  (3bed072); update the constant assertion and the give-up test
- test_vlm_engine: _prepare_vision_inputs gained an audios kwarg

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jundot

jundot commented May 19, 2026

Copy link
Copy Markdown
Owner

Thanks for the cleanup. The defaults in omlx/settings.py (chunked_prefill=False, soft_threshold=0.85, hard_threshold=0.95) line up exactly with the expected dicts here. Merging.

@jundot jundot merged commit 97ca5e6 into jundot:main May 19, 2026
cfbraun added a commit to cfbraun/omlx that referenced this pull request May 19, 2026
Closes a long-standing gap noticed during the upstream merge: the class
ships full to_dict/from_dict but had no tests, so field drift would have
gone unnoticed (cf. upstream jundot#1286 which had to retrofit the same
coverage for SchedulerSettings/MemorySettings).
cfbraun added a commit to cfbraun/omlx that referenced this pull request May 26, 2026
Closes a long-standing gap noticed during the upstream merge: the class
ships full to_dict/from_dict but had no tests, so field drift would have
gone unnoticed (cf. upstream jundot#1286 which had to retrofit the same
coverage for SchedulerSettings/MemorySettings).
cfbraun added a commit to cfbraun/omlx that referenced this pull request May 26, 2026
upstream acd0533 added max_process_memory_is_explicit,
prefill_safe_zone_ratio, and prefill_min_chunk_tokens to
MemorySettings.to_dict() but the to_dict test was not updated (last
touched in jundot#1286 on 2026-05-19, predating acd0533 by a week). The
test was already failing on upstream/main — this just closes the gap.
@mvanhorn

Copy link
Copy Markdown
Contributor Author

Big thanks @jundot - getting the to_dict test expectations in sync with the chunked_prefill / soft/hard_threshold fields unblocks local runs.

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.

FYI: some failing tests

2 participants