-
Notifications
You must be signed in to change notification settings - Fork 5
Require Algorithms & CategoryMaps to be registered before processing #942
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
Conversation
✅ Deploy Preview for antenna-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enforces a stricter pipeline configuration by requiring algorithms and category maps to be pre-registered before processing, removing the previous flexibility of dynamically creating them from pipeline responses. This change simplifies the system by throwing PipelineNotConfigured
exceptions when unregistered algorithms are encountered.
- Algorithms and category maps must be defined ahead of time via pipeline registration
- Unknown algorithms returned from processing services now raise exceptions instead of being dynamically created
- Processing service dependency added to docker-compose to ensure proper initialization order
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
docker-compose.yml | Adds ml_backend dependency to ensure processing service is available before pipeline registration |
ami/ml/exceptions.py | Introduces new PipelineNotConfigured exception for better error handling |
ami/ml/schemas.py | Renames PipelineConfig to PipelineConfigResponse for clarity |
ami/ml/models/algorithm.py | Adds task type enums, category map validation, and improved manager |
ami/ml/models/processing_service.py | Updates to support pipeline configuration parameter passing |
ami/ml/models/pipeline.py | Major refactoring to use pre-registered algorithms instead of dynamic creation |
ami/ml/tests.py | Updates tests to verify new exception behavior and removes dynamic algorithm creation tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ntenna into fix/duplicate-category-maps
Summary
Formerly we allowed prediction responses to define the algorithm & category map they used. This was flexible but added a lot of complexity. Now the algorithms and category maps must defined ahead of time and a
PipelineNotConfigured
exception will be thrown if an unexpected algorithm is returned from the processing service. The pipeline registration already handles the checking & creation of the algorithms available from a processing service.Related Issues
Relates to #782 & #721. Closes #941
Deployment Notes
The changes on the ADC side are now done and deployed Remove algorithm and category map details in every result response ami-data-companion#93
Checklist