Hand a device-scored sequence back to the API model when the device stops scoring

Đang mở
#736 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 6 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
42/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
fastapi, postgresql, python
Lĩnh vực
api, backend, databases

Hướng nghiên cứu

Read #723 and inspect the sequence scoring worker, the sequences model, and its migrations; the payload does not name file paths or tests. Compare the proposed frame-count fallback with the engine signal alternative, including how each distinguishes an unsupported device model from a failed model. Done means sequences resume API scoring after device scores stop and avoid applying WINDOW_EXHAUSTED from the old device score.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Follow-up of #723. Since that PR a frame without a device score keeps the sequence's last device verdict: the API never falls back to its own model once a sequence received a device score, and the stored score only ever rises.

Edge case. If the device stops sending scores for good in the middle of a sequence (pyro-engine fails open until the end of the event, pyronear/pyro-engine#415) while the stored max is below the threshold, frames keep arriving but nothing judges them anymore: no API scoring, no fail-open, no WINDOW_EXHAUSTED. A real fire on that sequence would never alert. Much less likely than the old single-blip reset, which is why #723 accepted it.

Proposal (fe51).

  • store when the device last sent a score, e.g. a device_scored_at column on sequences (migration);
  • in the worker, after N frames without a device score (e.g. MIN_FRAMES), take the API path on the last MAX_FRAMES frames;
  • in that case skip the WINDOW_EXHAUSTED rule based on the old device score.

Failing open there is acceptable because it only happens after N missed frames, not after one.

Alternative to weigh. The engine knows when it fails open. It could say so explicitly (an empty temporal_model_scores=[], or a dedicated flag) instead of sending nothing, and the API would hand the sequence back to its own model on that signal without counting frames and without a new column. Needs the engine to distinguish "no model on this device" from "model down since frame N".

Ngôn ngữ chính
Python
Star
30
Fork
15
Merge trung bình
7 ngày 16 giờ
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pyronear/pyro-api

Tất cả issue của pyronear/pyro-api

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.