-
Notifications
You must be signed in to change notification settings - Fork 2
Feat: Gather Data #203
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
Feat: Gather Data #203
Conversation
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.
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
depthai_nodes/node/gather_data.py:139
- Consider using '<=' rather than '<' in the tolerance check so that timestamps exactly on the threshold are considered matching, if that matches the intended behavior.
return difference < (1 / self._camera_fps / self.FPS_TOLERANCE_DIVISOR)
depthai_nodes/node/gather_data.py:195
- Using floating point values as dictionary keys for timestamps may lead to precision errors when matching; consider rounding or normalizing the timestamp value to a fixed precision before storing or comparing.
def _get_total_seconds_ts(self, buffer_like: dai.Buffer) -> float:
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #203 +/- ##
==========================================
+ Coverage 51.80% 53.31% +1.50%
==========================================
Files 81 83 +2
Lines 4799 4967 +168
==========================================
+ Hits 2486 2648 +162
- Misses 2313 2319 +6 ☔ View full report in Codecov by Sentry. |
tests/unittests/test_nodes/test_threaded_host_nodes/test_gather_data.py
Outdated
Show resolved
Hide resolved
jkbmrz
left a comment
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.
Generally LGTM, just adding two small comments
aljazkonec1
left a comment
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.
Overall the logic is the same as in previous PR and is good. Left some small comments on the docstrings.
kkeroo
left a comment
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.
LGTM
aljazkonec1
left a comment
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.
LGTM, just the last docstring update
Purpose
Addition of
GatherDatanode. The node can by default gather number ofNNDataspecified by the length ofdai.ImgDetections.detectionswith the same (or in tolerance) timestamp. The node can be used a n-stage sync.Specification
The
GatherDatanode and the related tests are added. ThegetAllmethod was added to the mockQueue. The mockQueue.sendwas changed such that the Infinite queues work as FIFO not LIFO. This makes the items in the Queue being cycled, instead of the last inserted being always returned.Dependencies & Potential Impact
The change of the mock
Queueto FIFO could change behavior of dependent tests.Deployment Plan
None / not applicable
Testing & Validation
The tests for
GatherDatawere made and are passing.