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 #74 ARM64 segfault. Two problems: the env var doesn't
work as described above, and #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.
#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 #581 proposes. This PR only removes the misleading no-op and
leaves a NOTE pointing at #521 / #581.
Closes #397
This commit is contained in:
committed by
GitHub
parent
4621f85d7c
commit
5b67e0740e
+13
-6
@@ -1,8 +1,6 @@
|
|||||||
"""MemPalace — Give your AI a memory. No API key required."""
|
"""MemPalace — Give your AI a memory. No API key required."""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
|
||||||
import platform
|
|
||||||
|
|
||||||
from .cli import main # noqa: E402
|
from .cli import main # noqa: E402
|
||||||
from .version import __version__ # noqa: E402
|
from .version import __version__ # noqa: E402
|
||||||
@@ -13,9 +11,18 @@ from .version import __version__ # noqa: E402
|
|||||||
# 1 positional argument but 3 were given"). Silence just that logger.
|
# 1 positional argument but 3 were given"). Silence just that logger.
|
||||||
logging.getLogger("chromadb.telemetry.product.posthog").setLevel(logging.CRITICAL)
|
logging.getLogger("chromadb.telemetry.product.posthog").setLevel(logging.CRITICAL)
|
||||||
|
|
||||||
# ONNX Runtime's CoreML provider segfaults during vector queries on Apple Silicon.
|
# NOTE: the previous block set ``ORT_DISABLE_COREML=1`` on macOS arm64 as a
|
||||||
# Force CPU execution unless the user has explicitly set a preference.
|
# supposed workaround for the #74 ARM64 segfault. Two problems:
|
||||||
if platform.machine() == "arm64" and platform.system() == "Darwin":
|
#
|
||||||
os.environ.setdefault("ORT_DISABLE_COREML", "1")
|
# 1. ONNX Runtime does not read that env var -- it has no global way to
|
||||||
|
# disable a single execution provider, so the setdefault was a no-op.
|
||||||
|
# 2. #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.
|
||||||
|
#
|
||||||
|
# #521 has since traced the actual macOS arm64 crashes (both in mine and
|
||||||
|
# search paths) 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 #581
|
||||||
|
# proposes. See #397 for the history of this line.
|
||||||
|
|
||||||
__all__ = ["main", "__version__"]
|
__all__ = ["main", "__version__"]
|
||||||
|
|||||||
Reference in New Issue
Block a user