efficient_sam fails to run on CoreML
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
🐛 Describe the bug
sh .ci/scripts/test_model.sh efficient_sam cmake coreml-pybind
gives
[ETCoreMLModelManager.mm:528] Cache Miss: Model with identifier=executorch_30d05004-6523-4d36-8a2f-11e9ce7e28e8_all was not found in the models cache.
2025-08-06 12:25:57.398 python3[84549:38112049] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph0/main_mps_graph0.mpsgraphpackage/resources.bin
2025-08-06 12:25:57.401 python3[84549:38112050] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph1/main_mps_graph1.mpsgraphpackage/resources.bin
2025-08-06 12:25:57.404 python3[84549:38102845] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph3/main_mps_graph3.mpsgraphpackage/resources.bin
2025-08-06 12:25:57.406 python3[84549:38112052] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph2/main_mps_graph2.mpsgraphpackage/resources.bin
2025-08-06 12:25:57.408 python3[84549:38112051] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph5/main_mps_graph5.mpsgraphpackage/resources.bin
2025-08-06 12:25:57.410 python3[84549:38112047] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph4/main_mps_graph4.mpsgraphpackage/resources.bin
2025-08-06 12:25:57.412 python3[84549:38112054] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph6/main_mps_graph6.mpsgraphpackage/resources.bin
2025-08-06 12:25:57.414 python3[84549:38112050] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph7/main_mps_graph7.mpsgraphpackage/resources.bin
2025-08-06 12:25:57.420 python3[84549:38112048] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph9/main_mps_graph9.mpsgraphpackage/resources.bin
2025-08-06 12:25:57.422 python3[84549:38112047] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph10/main_mps_graph10.mpsgraphpackage/resources.bin
2025-08-06 12:25:57.424 python3[84549:38112049] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph11/main_mps_graph11.mpsgraphpackage/resources.bin
2025-08-06 12:25:57.427 python3[84549:38102845] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph8/main_mps_graph8.mpsgraphpackage/resources.bin
2025-08-06 12:26:49.245 python3[84549:38114714] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph0/main_mps_graph0.mpsgraphpackage/resources.bin
2025-08-06 12:26:49.251 python3[84549:38114715] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph1/main_mps_graph1.mpsgraphpackage/resources.bin
2025-08-06 12:26:49.253 python3[84549:38114719] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph2/main_mps_graph2.mpsgraphpackage/resources.bin
2025-08-06 12:26:49.256 python3[84549:38114712] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph4/main_mps_graph4.mpsgraphpackage/resources.bin
2025-08-06 12:26:49.259 python3[84549:38114713] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph5/main_mps_graph5.mpsgraphpackage/resources.bin
2025-08-06 12:26:49.262 python3[84549:38114718] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph6/main_mps_graph6.mpsgraphpackage/resources.bin
2025-08-06 12:26:49.268 python3[84549:38114715] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph7/main_mps_graph7.mpsgraphpackage/resources.bin
2025-08-06 12:26:49.271 python3[84549:38114716] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph8/main_mps_graph8.mpsgraphpackage/resources.bin
2025-08-06 12:26:49.273 python3[84549:38114717] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph3/main_mps_graph3.mpsgraphpackage/resources.bin
2025-08-06 12:26:49.275 python3[84549:38114719] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph9/main_mps_graph9.mpsgraphpackage/resources.bin
2025-08-06 12:26:49.281 python3[84549:38114713] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph10/main_mps_graph10.mpsgraphpackage/resources.bin
2025-08-06 12:26:49.296 python3[84549:38114718] Error: resources.bin missing at file:///Users/scroy/Library/Caches/python3/com.apple.e5rt.e5bundlecache/24F74/3BDC0CFAEB3D6ED615DD318500DEF01EB3D8D0FD8BEB489B374144AC1ADCBBB3/11A59DCCBEA22A02C9F4F1E75644CACC755DD69470B858BB3EF30824BA277422.bundle/H13S.bundle/main/main_mps_graph11/main_mps_graph11.mpsgraphpackage/resources.bin
Traceback (most recent call last):
File "/opt/miniconda3/envs/et/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/miniconda3/envs/et/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Users/scroy/repos/executorch/examples/apple/coreml/scripts/export.py", line 280, in <module>
main()
File "/Users/scroy/repos/executorch/examples/apple/coreml/scripts/export.py", line 243, in main
run_with_pybindings(
File "/Users/scroy/repos/executorch/examples/apple/coreml/scripts/export.py", line 181, in run_with_pybindings
et_outputs = method.execute(*example_inputs)[0]
TypeError: Method.execute() takes 2 positional arguments but 4 were given
Versions
Collecting environment information...
PyTorch version: 2.9.0.dev20250725
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: macOS 15.5 (arm64)
GCC version: Could not collect
Clang version: 17.0.0 (clang-1700.0.13.5)
CMake version: version 3.31.6
Libc version: N/A
Python version: 3.10.18 (main, Jun 5 2025, 08:37:47) [Clang 14.0.6 ] (64-bit runtime)
Python platform: macOS-15.5-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Is XPU available: False
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Apple M1 Pro
Versions of relevant libraries:
[pip3] executorch==0.8.0a0+8e6c8ff
[pip3] mypy_extensions==1.1.0
[pip3] numpy==2.2.6
[pip3] optimum-executorch==0.0.0.dev0
[pip3] pytorch_tokenizers==0.1.0
[pip3] torch==2.9.0.dev20250725
[pip3] torchao==0.13.0+git2eb4f9762
[pip3] torchaudio==2.8.0.dev20250725
[pip3] torchdata==0.11.0
[pip3] torchsr==1.0.4
[pip3] torchtune==0.6.1
[pip3] torchvision==0.24.0.dev20250725
[conda] executorch 0.8.0a0+8e6c8ff pypi_0 pypi
[conda] numpy 2.2.6 pypi_0 pypi
[conda] optimum-executorch 0.0.0.dev0 pypi_0 pypi
[conda] pytorch-tokenizers 0.1.0 pypi_0 pypi
[conda] torch 2.9.0.dev20250725 pypi_0 pypi
[conda] torchao 0.13.0+git2eb4f9762 pypi_0 pypi
[conda] torchaudio 2.8.0.dev20250725 pypi_0 pypi
[conda] torchdata 0.11.0 pypi_0 pypi
[conda] torchsr 1.0.4 pypi_0 pypi
[conda] torchtune 0.6.1 pypi_0 pypi
[conda] torchvision 0.24.0.dev20250725 pypi_0 pypi
cc @kimishpatel @YifanShenSZ @cymbalrush
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/apple/coreml/scripts/export.py, especially run_with_pybindings at line 181 and main at lines 243 and 280, then run sh .ci/scripts/test_model.sh efficient_sam cmake coreml-pybind. Investigate the Method.execute argument mismatch alongside the reported missing resources.bin messages; done means the efficient_sam CoreML test completes without these errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, python
- Domain
- machine-learning, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100