-
Notifications
You must be signed in to change notification settings - Fork 491
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 performance test for LexiFlow #812
Add performance test for LexiFlow #812
Conversation
flaml/tune/searcher/flow2.py
Outdated
feasible_index_filter = np.where( | ||
k_values.take(feasible_index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k_values.take(feasible_index)
is calculated twice. Use a var to calculate only once.
flaml/tune/searcher/flow2.py
Outdated
feasible_index = [ | ||
val for val in feasible_index if val in feasible_index_prior | ||
] | ||
feasible_index = np.array(feasible_index).take(feasible_index_filter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move np.array()
to line 263.
flaml/tune/searcher/flow2.py
Outdated
@@ -374,9 +374,7 @@ def update_fbest( | |||
] | |||
) | |||
)[0].tolist() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove tolist()
.
use
feasible_index_filter, _ =
flaml/tune/tune.py
Outdated
feasible_index = [ | ||
val for val in feasible_index if val in feasible_index_prior | ||
] | ||
feasible_index = np.array(feasible_index).take(feasible_index_filter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar as above
assert ( | ||
analysis.best_result["currin"] <= 2.2 | ||
), "lexicographic optimization not reproducible" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the test named "reproducibility"? The assertion here is about the best currin score, not reproducibility.
test/tune/test_lexiflow.py
Outdated
@@ -138,5 +158,35 @@ def evaluate_function(configuration): | |||
print(analysis.best_result) | |||
|
|||
|
|||
def test_lexiflow_BraninCurrin(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def test_lexiflow_BraninCurrin(): | |
def test_lexiflow_performance(): |
Why are these changes needed?
Related issue number
#767
Checks