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 max batches stopping criterion logic #2875

Merged
merged 8 commits into from
Oct 7, 2021

Conversation

jeremyliweishih
Copy link
Collaborator

Fixes #2800.

@codecov
Copy link

codecov bot commented Oct 5, 2021

Codecov Report

Merging #2875 (698f8b9) into main (023babf) will increase coverage by 0.1%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2875     +/-   ##
=======================================
+ Coverage   99.7%   99.7%   +0.1%     
=======================================
  Files        302     302             
  Lines      28296   28312     +16     
=======================================
+ Hits       28200   28216     +16     
  Misses        96      96             
Impacted Files Coverage Δ
evalml/automl/automl_search.py 99.9% <100.0%> (+0.1%) ⬆️
evalml/tests/automl_tests/test_automl.py 99.5% <100.0%> (+0.1%) ⬆️
evalml/tests/automl_tests/test_search.py 100.0% <100.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 023babf...698f8b9. Read the comment docs.

elapsed = time.time() - self._start
if self.max_time and elapsed >= self.max_time:
return False
elif self.max_iterations and num_pipelines >= self.max_iterations:
return False
elif self.max_batches and self._get_batch_number() > self.max_batches:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This logic would only be invoked for DefaultAlgorithm as max_iterations is set when it is None when using IterativeAlgorith.

Copy link
Contributor

@bchen1116 bchen1116 left a comment

Choose a reason for hiding this comment

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

LGTM! Left some nits and a question for my own clarification

docs/source/release_notes.rst Outdated Show resolved Hide resolved
evalml/automl/automl_search.py Outdated Show resolved Hide resolved
elif mode == "long" and max_time:
max_batches = 999 # defers to stopping criterion
elif mode == "long" and max_time is None:
max_batches = 6 # corresponds to end of 'long' exploration phase
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain where 4 and 6 come from?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Batch 4 is the end of fast mode where we run our first ensembling run.
Batch 6 is the the part of long mode where we do our second ensembling round after running the exploration phase of long mode.

@jeremyliweishih jeremyliweishih merged commit 717075f into main Oct 7, 2021
@chukarsten chukarsten mentioned this pull request Oct 14, 2021
@freddyaboulton freddyaboulton deleted the js_2800_long_bactch_fix branch May 13, 2022 15:03
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.

Long mode of search() does not go past fast batches unless specified with max_time
2 participants