Skip to content

add GlobalStoppingAware protocol - #337

Merged
thopkins32 merged 2 commits into
bluesky:mainfrom
jessica-moylan:stopping
Aug 3, 2026
Merged

add GlobalStoppingAware protocol#337
thopkins32 merged 2 commits into
bluesky:mainfrom
jessica-moylan:stopping

Conversation

@jessica-moylan

Copy link
Copy Markdown
Collaborator

The start of adding a global early stopping condition.

@thopkins32 thopkins32 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A few suggestions.

I would also suggest removing "global" from the protocol. Ax may have "global" stopping criteria, but that wording may not apply to all optimizer backends.

Please also add tests with a mocked protocol interface.

Comment thread src/blop/plans.py Outdated
Comment thread src/blop/plans.py Outdated
Comment thread src/blop/plans.py Outdated
Comment thread src/blop/plans.py Outdated
Comment on lines +227 to +228
if stop_now:
print(f"Global stopping triggered at iteration {i + 1}: {stop_reason}")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What if stop_reason is None?

@MTakahashi-KWH

Copy link
Copy Markdown
Collaborator

Would using "...aware" be a misnomer as the optimizer would be emitting the global stop command/signal. I would think something like "GlobalStopSignaling/able" if using mixin naming or "GlobalStopSignal" if using protocol object naming would be clearer.

@thopkins32 thopkins32 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, may suggest a follow-up name change to HasStoppingCriteria or SupportsStoppingCondition but functionally this looks correct.

@thopkins32
thopkins32 merged commit fb52f63 into bluesky:main Aug 3, 2026
9 of 10 checks passed
@jessica-moylan
jessica-moylan deleted the stopping branch August 3, 2026 18:33
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.

3 participants