Skip to content

Commit

Permalink
fix: Cross validation process isn't always run to completion (#1360)
Browse files Browse the repository at this point in the history
  • Loading branch information
dannycg1996 authored Oct 1, 2024
1 parent e5d95f5 commit 5c0f18b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions flaml/automl/task/generic_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,6 @@ def evaluate_model_CV(
fit_kwargs = {}
if cv_score_agg_func is None:
cv_score_agg_func = default_cv_score_agg_func
start_time = time.time()
val_loss_folds = []
log_metric_folds = []
metric = None
Expand Down Expand Up @@ -813,8 +812,6 @@ def evaluate_model_CV(
if is_spark_dataframe:
X_train.spark.unpersist() # uncache data to free memory
X_val.spark.unpersist() # uncache data to free memory
if budget and time.time() - start_time >= budget:
break
val_loss, metric = cv_score_agg_func(val_loss_folds, log_metric_folds)
n = total_fold_num
pred_time /= n
Expand Down

0 comments on commit 5c0f18b

Please sign in to comment.