Skip to content

Commit

Permalink
fix only first 4 gmb models usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-rinchin committed Jul 31, 2024
1 parent b8e11d6 commit 3a69c94
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lightautoml/automl/presets/tabular_presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,10 @@ def get_gbms(

ml_algos = []
force_calc = []
for key, force in zip(keys, [True, False, False, False]):
for idx, key in enumerate(keys):
if idx == 0: # force calculations only for the first ml_algo
force = True

tuned = "_tuned" in key
algo_key = key.split("_")[0]
time_score = self.get_time_score(n_level, key)
Expand All @@ -511,6 +514,7 @@ def get_gbms(
gbm_model = (gbm_model, gbm_tuner)
ml_algos.append(gbm_model)
force_calc.append(force)
force = False

gbm_pipe = NestedTabularMLPipeline(
ml_algos, force_calc, pre_selection=pre_selector, features_pipeline=gbm_feats, **self.nested_cv_params
Expand Down

0 comments on commit 3a69c94

Please sign in to comment.