Skip to content

Fix search order changing due to using a set in DefaultAlgorithm #3704

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

Merged
merged 4 commits into from
Sep 13, 2022

Conversation

jeremyliweishih
Copy link
Collaborator

Fixes search order changing.

@@ -182,9 +182,11 @@ def _naive_estimators(self):
return estimators

def _non_naive_estimators(self):
return list(
set(get_estimators(self.problem_type)) - set(self._naive_estimators()),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Using a set could change the order. This was only seen recently and between branches as well 😮

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a test to make sure this doesn't somehow happen again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not sure how I can test this since it didn't appear to change within the same run. Any suggestions?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, not exactly sure. We could hard code the expected order, although we'd have to keep it up to date with every new added estimator. Up to you whether you think we should add something like that or not. Either way, the change looks good!

@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

Merging #3704 (dbfed64) into main (034068a) will not change coverage.
The diff coverage is 100.0%.

@@          Coverage Diff          @@
##            main   #3704   +/-   ##
=====================================
  Coverage   99.7%   99.7%           
=====================================
  Files        339     339           
  Lines      34431   34431           
=====================================
  Hits       34304   34304           
  Misses       127     127           
Impacted Files Coverage Δ
...valml/automl/automl_algorithm/default_algorithm.py 100.0% <100.0%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -182,9 +182,11 @@ def _naive_estimators(self):
return estimators

def _non_naive_estimators(self):
return list(
set(get_estimators(self.problem_type)) - set(self._naive_estimators()),
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, not exactly sure. We could hard code the expected order, although we'd have to keep it up to date with every new added estimator. Up to you whether you think we should add something like that or not. Either way, the change looks good!

Copy link
Contributor

@christopherbunn christopherbunn left a comment

Choose a reason for hiding this comment

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

Interesting to see this pop up because we're using a set, but ty for fixing!

@jeremyliweishih jeremyliweishih merged commit 0ac4dae into main Sep 13, 2022
@jeremyliweishih jeremyliweishih deleted the js_fix_default_ordering branch September 13, 2022 17:30
@chukarsten chukarsten mentioned this pull request Sep 20, 2022
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