Skip to content

fix(test): isolate HF hub cache in test_registry_discover (#101)#102

Merged
lgsunnyvale merged 1 commit into
mainfrom
test_registry_discover-fails-due-to-leaking-real-hf-hub-cache
Jul 20, 2026
Merged

fix(test): isolate HF hub cache in test_registry_discover (#101)#102
lgsunnyvale merged 1 commit into
mainfrom
test_registry_discover-fails-due-to-leaking-real-hf-hub-cache

Conversation

@tlkahn

@tlkahn tlkahn commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • Confirm RED: ./tests/test_registry_discover fails with assert(count == 2) when real HF models are present
  • Confirm GREEN after fix: ./tests/test_registry_discover passes
  • ASan run of test_registry_discover clean
  • Full suite: make test - 43 passed, 0 failed

unsetenv(MLXD_HF_HUB_DIR) let reg_hf_hub_dir() fall through to the real
$HOME/.cache/huggingface/hub, inflating discovery counts. Point the four
fixture-only tests at /nonexistent instead.
@tlkahn
tlkahn requested a review from lgsunnyvale as a code owner July 20, 2026 04:12
@lgsunnyvale
lgsunnyvale merged commit 20e5434 into main Jul 20, 2026
1 check passed
@lgsunnyvale
lgsunnyvale deleted the test_registry_discover-fails-due-to-leaking-real-hf-hub-cache branch July 20, 2026 04:13
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.

test_registry_discover fails due to leaking real HF hub cache

2 participants