Skip to content

Commit

Permalink
change config_space data extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasvente committed Nov 21, 2023
1 parent 387026a commit 6d609cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lkauto/utils/update_top_n_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ def update_top_n_runs(num_models: int, top_n_runs: pd.DataFrame, run_id: int, co
max_index = i

# get the runs for the model type with the most runs
silo = top_n_runs[top_n_runs['model'] == config_space['regressor']]
silo = top_n_runs[top_n_runs['model'] == config_space['algo']]

if len(silo) == max_len:
# get the worst run of the model type with the most runs
worst_performance = silo['error'].max()

# remove the worst run of the model type with the most runs
top_n_runs = top_n_runs[top_n_runs['model'] != config_space['regressor']]
top_n_runs = top_n_runs[top_n_runs['model'] != config_space['algo']]

# add the new run to the dataframe
silo = silo[silo['error'] < worst_performance]
Expand Down

0 comments on commit 6d609cd

Please sign in to comment.