Skip to content

Commit 9f2b5f9

Browse files
mihowclaude
andcommitted
fix(antenna worker): use classifier.detector_cls instead of hardcoded APIMothDetector
The original detector_cls refactor in #141 updated the API path (api.py) but missed the antenna worker path. When a pipeline declares a non-default detector (e.g. mothbot_insect_orders_2025 with YOLO11m), the worker was still running FasterRCNN detection, then posting results with the FasterRCNN algorithm key, and Antenna rejected them because the /info endpoint declared only the YOLO and order-classifier algorithms. NATS re-delivered the message in a loop. Discovered when testing job 1492 on the local Antenna at beast: Error processing pipeline result for job 1492: Detection algorithm fasterrcnn_for_ami_moth_traps_2023 is not a known algorithm. Known: ['insect_order_classifier_mothbot_yolo_detector', 'mothbot_yolo11m_creature_detector']. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 36fc00d commit 9f2b5f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

trapdata/antenna/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ def _process_job(
464464
# Defer instantiation of poster, detector and classifiers until we have data
465465
if not classifier:
466466
classifier = classifier_class(source_images=[], detections=[])
467-
detector = APIMothDetector([])
467+
detector = classifier_class.detector_cls([])
468468
result_poster = ResultPoster(max_pending=MAX_PENDING_POSTS)
469469

470470
if use_binary_filter:

0 commit comments

Comments
 (0)