fix: remove no-op ORT_DISABLE_COREML env var (#397)#653
Merged
bensig merged 1 commit intoMemPalace:developfrom Apr 12, 2026
Merged
fix: remove no-op ORT_DISABLE_COREML env var (#397)#653bensig merged 1 commit intoMemPalace:developfrom
bensig merged 1 commit intoMemPalace:developfrom
Conversation
ORT_DISABLE_COREML is not a recognized ONNX Runtime environment variable. ONNX Runtime does not expose a global env var to disable individual execution providers -- providers are selected per session via the providers argument to InferenceSession. Setting it had zero effect. The mitigation was added in df33550 (v3.1.0) with the stated goal of fixing the MemPalace#74 ARM64 segfault. Two problems: the env var doesn't work as described above, and MemPalace#74 is a null-pointer crash in chromadb_rust_bindings.abi3.so -- not an ONNX issue, so disabling CoreML would not have fixed it anyway. MemPalace#521 has since traced the actual macOS arm64 crashes (both mine and search) to the 0.x chromadb hnswlib binding. Filtering CoreMLExecutionProvider at the ONNX layer leaves the hnswlib C++ crash intact, so the real fix is upgrading chromadb to 1.5.4+, which MemPalace#581 proposes. This PR only removes the misleading no-op and leaves a NOTE pointing at MemPalace#521 / MemPalace#581. Closes MemPalace#397
8575ae4 to
af9c0f3
Compare
This was referenced Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Closes #397.
ORT_DISABLE_COREMLis not a recognized ONNX Runtime environment variable, so theos.environ.setdefaultinmempalace/__init__.pywas a silent no-op. ONNX Runtime does not expose a global way to disable a specific execution provider -- providers are selected per session via theprovidersargument toInferenceSession. The CoreMLExecutionProvider was still loaded on Apple Silicon, so the code claimed a mitigation that never worked.Why the old mitigation never helped
The line was added in df33550 (v3.1.0) with the stated goal of fixing the #74 ARM64 segfault. In practice:
chromadb_rust_bindings.abi3.so, not in ONNX Runtime, so disabling CoreML would not have fixed it anyway.mineandsearchpaths) to the 0.x chromadb hnswlib binding. Filtering CoreMLExecutionProvider at the ONNX layer leaves the hnswlib C++ crash intact, so the real fix is upgrading chromadb to 1.5.4+, which fix: upgrade chromadb to >=1.5.4 for python 3.13/3.14 compatibility #581 proposes.Fix
os.environ.setdefault("ORT_DISABLE_COREML", "1")call.osandplatformimports.Test plan
598 tests pass, file is format-clean.
Conflict check vs #581
#581 also touches
mempalace/__init__.py, but only the posthog telemetry comment block. The ORT block lives a few lines below and is not in #581's hunk, so the two PRs modify non-overlapping regions and can merge in either order without a hard conflict.