[DO NOT MERGE] fix(controller): prevent Re-ID fallback from firing while features are still being gathered#1444
Conversation
Agent-Logs-Url: https://github.com/open-edge-platform/scenescape/sessions/b01747ad-5665-488d-9575-5f6498edd0f5 Co-authored-by: saratpoluri <1325325+saratpoluri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/open-edge-platform/scenescape/sessions/b01747ad-5665-488d-9575-5f6498edd0f5 Co-authored-by: saratpoluri <1325325+saratpoluri@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes a logic bug in UUIDManager.assignID where the “fallback” assignment of the generated GID could run while Re-ID feature collection was still in progress, permanently preventing similarity queries for newly detected tracks.
Changes:
- Guarded the GID fallback so it only executes when
reid_enabledis explicitly disabled. - Reworked the conditional flow so Re-ID similarity queries are submitted only when Re-ID is enabled and sufficient visual features have been collected.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…fallback fix) Agent-Logs-Url: https://github.com/open-edge-platform/scenescape/sessions/2c08cbd9-3c79-4c79-a87d-7d620301877d Co-authored-by: saratpoluri <1325325+saratpoluri@users.noreply.github.com>
Head branch was pushed to by a user without write access
Added 16 unit tests in PR #1155 – static UUID preservation after occlusion (
Current PR fix –
|
|
Minor issue: PR fix description is not up-to-date with the implementation. PR description mentions |
tdorauintc
left a comment
There was a problem hiding this comment.
I got the following errors after adding the targets for uuid-manager tests following the convention used for other unit tests. Please provide the correct way to run the tests and make sure that those are executed as a part of BAT.
==================================== ERRORS ====================================
______________ ERROR collecting uuid_manager/test_uuid_manager.py ______________
ImportError while importing test module '/home/tdorau/repos/scenescape/tests/sscape_tests/uuid_manager/test_uuid_manager.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/sscape_tests/uuid_manager/test_uuid_manager.py:17: in <module>
from controller.uuid_manager import (DEFAULT_MINIMUM_FEATURE_COUNT,
E ModuleNotFoundError: No module named 'controller.uuid_manager'
- generated xml file: /home/tdorau/repos/scenescape/tests/reports/test_reports/unit-tests/uuid-unit.xml -
=========================== short test summary info ============================
ERROR tests/sscape_tests/uuid_manager/test_uuid_manager.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.22s ===============================
/usr/local/lib/python3.10/dist-packages/coverage/inorout.py:561: CoverageWarning: Module sscape/ was never imported. (module-not-imported); see https://coverage.readthedocs.io/en/7.14.0/messages.html#warning-module-not-imported
self.warn(f"Module {pkg} was never imported.", slug="module-not-imported")
/usr/local/lib/python3.10/dist-packages/coverage/control.py:958: CoverageWarning: No data was collected. (no-data-collected); see https://coverage.readthedocs.io/en/7.14.0/messages.html#warning-no-data-collected
self._warn("No data was collected.", slug="no-data-collected")
|
@copilot address code review comments. |
…ests Agent-Logs-Url: https://github.com/open-edge-platform/scenescape/sessions/fc03c776-3187-4a9c-b2a9-61561ef4fbfc Co-authored-by: saratpoluri <1325325+saratpoluri@users.noreply.github.com>
Addressed in commit 8ca275b:
The |
|
I will re-review once the PR is rebased onto refactored tests and all checks are passing. |
📝 Description
In
UUIDManager.assignID, the conditional flow was restructured to prevent the GID fallback from firing while Re-ID feature collection is still in progress.Previously, the fallback branch (which assigns the generated GID to
active_ids) ran not only when Re-ID is disabled, but also during the first~DEFAULT_MINIMUM_FEATURE_COUNTframes of every new track while features were still accumulating. Onceactive_ids[rv_id][0]was set to a non-Nonevalue,isNewTrackerID()returnedFalse, skipping the entire new-track branch on subsequent frames — sogatherQualityVisualFeatureswas never called again,haveSufficientVisualFeaturesnever becameTrue, and the similarity query was never submitted. Re-ID was silently broken for all newly detected tracks.Fix: The
if/elseblock inassignIDwas restructured so that:Tests: 16 unit tests added in
tests/sscape_tests/uuid_manager/and wired into the BATunit-teststarget viauuid-manager-unitintests/Makefile.sscapeandtests/Makefile, covering:pruneInactiveTrackscorrectly accepts a set of all active C++ tracker objects (reliable + unreliable + suspended), preserving GIDs for occluded/suspended objects;pickBestIDrestores stored GIDs so reappearing static objects keep their original identity.active_ids[rv_id]stays[None, None]while features are still accumulating; fallback fires only when Re-ID is explicitly disabled; similarity query is submitted exactly once when sufficient features are collected.✨ Type of Change
🧪 Testing Scenarios
✅ Checklist