Skip to content

Safely Terminate Aggregator#362

Merged
kimichenn merged 3 commits into
mainfrom
feat/terminate-aggregator
May 13, 2026
Merged

Safely Terminate Aggregator#362
kimichenn merged 3 commits into
mainfrom
feat/terminate-aggregator

Conversation

@kimichenn

Copy link
Copy Markdown
Contributor

Closes #324

We now:

  • Terminate aggregator safely and early when targets/matched is hit, and move to CVLoiter, then automatically to AirdropPrep
  • Remove the check for whether we are in CVLoiter. If not, we move to CVLoiter then automatically to AirdropPrep

@AskewParity AskewParity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this, it should free a good amount of resources if our CV models are decent Lol.

I think this PR could be accomplished using C++'s thread management itself. That method probably reduces the complexity and increases the stability/reliability of shutting down the threads.

There were originally more comments over specific implementation techniques, but we can revisit them at a later time if we are keeping this solution.

Comment thread src/cv/aggregator.cpp
Comment thread src/cv/aggregator.cpp
Comment thread src/cv/aggregator.cpp
Comment thread src/cv/aggregator.cpp Outdated
Comment thread include/cv/aggregator.hpp Outdated
Comment thread src/network/gcs_routes.cpp Outdated
@AskewParity

AskewParity commented May 8, 2026

Copy link
Copy Markdown
Contributor

Also, while reviewing this PR. I don't think I/we have a good definition of what CVAggregator is supposed to be. It is possible to be initialized multiple times under different circumstances. We should decide on (and document) what CV aggregator is and how it interacts with the mission loop+other things.

What I imagined before now was that CV aggregator was the module that the mission state/loop communicated to in order to access CV pipeline results.

ok after looking for a bit, aggregator is a mess; we should refactor it.

Comment thread src/network/gcs_routes.cpp

@AskewParity AskewParity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this rewrite of the PR. I think it is more maintainable now.

I just have one clerical change to make.

Comment thread src/cv/aggregator.cpp
@kimichenn
kimichenn requested a review from AskewParity May 13, 2026 04:45
@kimichenn
kimichenn merged commit e817fe4 into main May 13, 2026
2 checks passed
@kimichenn
kimichenn deleted the feat/terminate-aggregator branch May 13, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminate Aggregator Early

3 participants