Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(services/vision/ml_model): add err to errList when build attempt fails #4659

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HipsterBrown
Copy link
Contributor

While working on a new MLModel service module, I ran into an issue testing it with vision/mlmodel module where the vision module would panic due to indexing a list out of bounds:

12/31/2024, 10:18:01 AM error rdk.resource_manager.rdk:service:vision/vision-1 resource/graph_node.go:296 resource build error: panic creating resource: runtime error: index out of range [1] with length 1 resource rdk:service:vision/vision-1 model rdk:builtin:mlmodel

I traced the source of the error to the vision's Reconfigure method, which expects an errList variable to have at least 3 values for each attempt at building a different type of vision service (classifier, detector, 3D segmenter). This logic only works if the first checks of attemptToBuildClassifier and attemptToBuildDetector don't error, which was happening with my in-progress module. I've resolved this by appending the result errors from those checks to the errList to maintain the expected length.

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Dec 31, 2024
@HipsterBrown HipsterBrown requested a review from bhaney December 31, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants