Conversation
…s False load_optimized()'s final fallback branch (taken when the optimized runtime check fails) unconditionally imported ultralytics. mps installs deliberately ship without torch/ultralytics (requirements_mps.txt: only onnxruntime is needed), so any mps machine where the CoreML EP check fails crashed with "No module named 'ultralytics'" instead of falling back to the pre-built ONNX model via plain CPUExecutionProvider. Now mps uses _load_onnx_coreml() (already used elsewhere in this same function) in that branch instead, matching the file's own stated intent. Addresses one of the symptoms in #207. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fix(yolo-skill): don't require ultralytics on mps when framework_ok is False
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.
Summary
Promotes
developtomaster. The relevant change for this PR is #210 (already merged intodevelop), which needs to reachmasterbecause the Aegis-AI app's skill installer clones theyolo-detection-2026skill frommasterat install/reinstall time (skill-registry-service.cjs) —developisn't in that path, so #210 alone didn't reach any installed skill.load_optimized()'s final fallback branch (taken when the optimized runtime check fails,framework_ok=False) unconditionally imported ultralytics — but mps installs deliberately never ship torch/ultralytics (requirements_mps.txtonly listsonnxruntime)._check_mps_runtime()fails (CoreML execution provider not found) crashed withNo module named 'ultralytics'when loading a YOLO skill, instead of falling back to the pre-built.onnxmodel via plainCPUExecutionProvider.Locally dry-ran this merge (
git merge origin/developontomaster, no--no-ffconflicts) — clean, no conflicts; the diff is exactly the #210 fix (104 lines across 2env_config.pycopies + 1 new test file), nothing else fromdevelopleaks in unexpectedly sincedevelop's only commits ahead ofmasterare the #210 fix itself.Test plan
skills/lib/test_env_config_mps_fallback.py(3 tests) re-verified against currentmasterpost-merge — passes.skills/lib/test_env_config_*.pysuite — 4 pre-existing failures intest_env_config_ane.pyreproduce identically onmasterwithout this change (confirmed by temporarily reverting just the twoenv_config.pyfiles tomaster's version and re-running) — not introduced by this change.yolo-detection-2026skill from the Aegis-AI Skills sidebar to pick it up.🤖 Generated with Claude Code