Skip to content
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

Add Stopping Criteria for loop #286

Merged
merged 3 commits into from
May 13, 2024
Merged

Add Stopping Criteria for loop #286

merged 3 commits into from
May 13, 2024

Conversation

Dref360
Copy link
Member

@Dref360 Dref360 commented Apr 21, 2024

Summary:

Allow the users to stop the loop according to various parameters.

Features:

Fixes #243

Checklist:

  • Your code is documented (To validate this, add your module to tests/documentation_test.py).
  • Your code is tested with unit tests.
  • You moved your Issue to the PR state.

Comment on lines 70 to 71
al_loop.step()
if stopping_criterion.should_stop():
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wondering if you wanna change these two lines to below lines to account for general exhaustion of the dataset. The scenario does not apply to this example but as a demonstration of how to account for general exhaustion of the dataset and if the stop criteria is a metric limit

Suggested change
al_loop.step()
if stopping_criterion.should_stop():
flag = al_loop.step()
if stopping_criterion.should_stop() or flag:

Copy link
Member Author

Choose a reason for hiding this comment

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

My thinking was that stopping criteria must be added to ALLoop which would check for both the criteria and exhaustion. It would require ALLoop to know about metrics which it can't do right now.

That would be a major breaking change, so we might want to have a new object instead and deprecate ALLoop 🤔 and then this new object would do the entire experiment?

Copy link
Collaborator

@parmidaatg parmidaatg left a comment

Choose a reason for hiding this comment

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

neat, Just one suggestion but not necessary.

@Dref360
Copy link
Member Author

Dref360 commented May 11, 2024

I'll merge this and then I'll make a proposal for the new object that replaces ActiveLearningLoop into an object that can uses this new Criterion to automatically stop an experiment.

@Dref360 Dref360 marked this pull request as ready for review May 11, 2024 16:55
@Dref360 Dref360 enabled auto-merge (squash) May 11, 2024 16:55
Copy link
Collaborator

@parmidaatg parmidaatg left a comment

Choose a reason for hiding this comment

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

sounds good, lets go

@Dref360 Dref360 merged commit 4171b7a into master May 13, 2024
2 checks passed
@Dref360 Dref360 deleted the BAAL-243/stopping_criterion branch May 13, 2024 15:22
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.

Stopping criterion API
2 participants