fix(core): harden diffusion strategy callbacks - #925
shubhamsinnh wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe diffusion registry now documents strategy error propagation, catches exceptions from registry callbacks, corrects CoreML model definitions, and adds tests for returned errors, thrown exceptions, empty outputs, and backend fallback behavior. ChangesDiffusion registry hardening
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to No concrete current-head issue remains; the callback exception handling, fallback behavior, documentation, and regression coverage are merge-ready. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 4 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @sanchitmonga22 , |
Description
Completes the hardening follow-up from #715:
RAC_ERROR_NOT_FOUNDis the only strategy result that defers to later strategies;can_handle,get_model_def, andselect_backendat the public C ABI boundary;std::bad_alloctoRAC_ERROR_OUT_OF_MEMORYand unexpected exceptions toRAC_ERROR_INTERNALwhere an error channel exists;Fixes #851.
Type of Change
Testing
clang-formatis not installed on this Windows hostValidation performed:
cmake --build build-issue851 --target test_diffusion_model_registry --parallel 4— passed with MinGW/Ninja.ctest --test-dir build-issue851 -R '^diffusion_model_registry_tests$' --output-on-failure— passed, 17 checks and 0 failures.git diff --check— passed.Platform-Specific Testing
Not applicable. This changes the shared native registry contract and adds a backend-independent native test; no application UI or device behavior changed.
Labels
core— C++ commons core (core/)Checklist
Screenshots
Not applicable; no UI changes.
Summary by CodeRabbit
Bug Fixes
Documentation
Tests