-
Notifications
You must be signed in to change notification settings - Fork 47
Add per-zone max_age overrides for tracker lifecycle #76
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
base: main
Are you sure you want to change the base?
Changes from all commits
a653513
f992826
38404e8
f15a882
0de2d0d
d99707d
47c26f4
701bd06
37f2170
947c386
416f0ab
6533985
224b6a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,7 +36,10 @@ | |||||||||||||
| import numpy as np | ||||||||||||||
|
|
||||||||||||||
| from libs.observability.metrics import redis_write_latency | ||||||||||||||
| from libs.schemas.memory import ActionHint, TrackEvent, TrackSequence | ||||||||||||||
| from libs.schemas.memory import ( | ||||||||||||||
| TrackEvent, | ||||||||||||||
| TrackSequence, | ||||||||||||||
| ) | ||||||||||||||
| from libs.schemas.tracking import TrackLifecycleEvent, TrackState | ||||||||||||||
| from services.tracking.cross_camera_reid import CrossCameraReID | ||||||||||||||
| from services.memory.baseline import ZoneBaseline | ||||||||||||||
|
|
@@ -344,8 +347,10 @@ def get_sequence(self, track_id: int, last_n: Optional[int] = None, camera_id: O | |||||||||||||
| key = self._seq_key(track_id) | ||||||||||||||
| raw_list = self._r.lrange(key, -last_n, -1) if last_n else self._r.lrange(key, 0, -1) | ||||||||||||||
|
|
||||||||||||||
| events: list[TrackEvent] = [] | ||||||||||||||
| for raw in raw_list: | ||||||||||||||
| def get_active_track_ids(self, camera_id: str) -> set[int]: | ||||||||||||||
| members = self._r.smembers(self._active_key(camera_id)) | ||||||||||||||
| result: set[int] = set() | ||||||||||||||
| for m in members: | ||||||||||||||
|
Comment on lines
+350
to
+353
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This insertion breaks Placing a new method here ends 🐛 Suggested correction- def get_active_track_ids(self, camera_id: str) -> set[int]:
- members = self._r.smembers(self._active_key(camera_id))
- result: set[int] = set()
- for m in members:
+ events: list[TrackEvent] = []
+ for raw in raw_list:Keep the single 📝 Committable suggestion
Suggested change
🧰 Tools🪛 GitHub Actions: Phase 3 — Memory Tests / 0_test.txt[error] 352-352: ruff check (F841): Local variable 🪛 GitHub Actions: Phase 3 — Memory Tests / test[error] 352-352: Ruff (F841): Local variable 🤖 Prompt for AI Agents |
||||||||||||||
| try: | ||||||||||||||
| data = json.loads(raw if isinstance(raw, str) else raw.decode()) | ||||||||||||||
| events.append(TrackEvent(**data)) | ||||||||||||||
|
|
||||||||||||||
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.
Restore
ActionHintin this import.store_event()still comparesevent.action_hinttoActionHint.ZONE_ENTRYat Line 329, so dropping the import makes the module fail lint and raises on that path at runtime.🐛 Minimal fix
from libs.schemas.memory import ( + ActionHint, TrackEvent, TrackSequence, )📝 Committable suggestion
🤖 Prompt for AI Agents