-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fixed default mapping when lambda function called #8250
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe recent changes enhance the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- cvat/apps/lambda_manager/views.py (2 hunks)
Additional comments not posted (2)
cvat/apps/lambda_manager/views.py (2)
274-276
: Shift focus from model labels to task labels.The inner loop now iterates over
task_label.attributespec_set.all()
instead ofmodel_label.attributespec_set.all()
. This change ensures that theattributes_default_mapping
dictionary is built using attributes from the task label, which aligns with the intended functionality to prioritize task-specific attributes.
352-352
: Simplification of mapping validation logic.The conditional check that determined whether to call
make_default_mapping
orvalidate_labels_mapping
has been removed. Now,make_default_mapping
is always called withmodel_labels
andtask_labels
, which simplifies the logic but may lead to different behavior when a mapping already exists.Ensure that this change does not introduce unintended side effects, especially in scenarios where a mapping is already present.
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8250 +/- ##
===========================================
- Coverage 83.36% 83.32% -0.05%
===========================================
Files 388 388
Lines 41395 41395
Branches 3856 3856
===========================================
- Hits 34508 34491 -17
- Misses 6887 6904 +17
|
Motivation and context
make_default_mapping
didn't work well for lambda functions with attributesRelated #8213
How has this been tested?
Checklist
develop
branch(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit
New Features
Bug Fixes