-
Notifications
You must be signed in to change notification settings - Fork 3k
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 ValueError: operands could not be broadcast together with shapes (X, ) (Y, ) #8179
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 changes in 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/dataset_manager/task.py (2 hunks)
Additional comments not posted (2)
cvat/apps/dataset_manager/task.py (2)
657-658
: Correct initialization of SKELETON shapes in tracks.The changes ensure that shapes of type SKELETON within tracks are initialized with an empty list of points, aligning with the fixes made in shape initialization.
Verify that this change does not impact other track functionalities, especially those related to shape interpolation.
566-567
: Proper handling of SKELETON type shapes.The changes correctly initialize SKELETON shapes with an empty list of points to prevent broadcasting errors. This is a crucial fix for the issue described.
However, ensure that this initialization does not inadvertently affect other functionalities related to shapes.
Verification successful
Proper handling of SKELETON type shapes.
The changes correctly initialize SKELETON shapes with an empty list of points to prevent broadcasting errors. This is a crucial fix for the issue described.
- The verification confirms that no other shape types are affected by this change.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that other shape types are unaffected by the change to SKELETON shapes. # Test: Search for other shape type handling in the same method. Expect: No other shape types should be affected. rg --type python -A 5 -B 5 "if db_shape\['type'\] == str\(models\.ShapeType\.SKELETON\)" cvat/apps/dataset_manager/task.pyLength of output: 161
Script:
#!/bin/bash # Description: Verify that other shape types are unaffected by the change to SKELETON shapes. # Test: Search for other shape type handling in the same method. Expect: No other shape types should be affected. rg -A 5 -B 5 "if db_shape\['type'\] == str(models\.ShapeType\.SKELETON\)" cvat/apps/dataset_manager/task.pyLength of output: 253
Script:
#!/bin/bash # Description: Verify that other shape types are unaffected by the change to SKELETON shapes. # Test: Search for other shape type handling in the same method. Expect: No other shape types should be affected. rg -A 5 -B 5 "if db_shape\['type'\] == str(models\.ShapeType\.SKELETON)" cvat/apps/dataset_manager/task.pyLength of output: 114
Script:
#!/bin/bash # Description: Verify that other shape types are unaffected by the change to SKELETON shapes. # Test: Search for all instances of shape type handling in the file. Expect: No other shape types should be affected. rg "db_shape\['type'\]" cvat/apps/dataset_manager/task.pyLength of output: 203
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8179 +/- ##
===========================================
+ Coverage 83.35% 83.37% +0.01%
===========================================
Files 388 388
Lines 41306 41311 +5
Branches 3854 3854
===========================================
+ Hits 34432 34443 +11
+ Misses 6874 6868 -6
|
Motivation and context
CVAT for Images
Stacktrace:
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
SKELETON
type shapes to prevent errors by setting their points to an empty list.