Skip to content

Commit

Permalink
Fix kats:kats-type-checking
Browse files Browse the repository at this point in the history
Summary:
As the new LightGBM library version was rolled out, the test was failed at https://www.internalfb.com/intern/test/562950130862286.
This diff fixes the test.

Differential Revision: D65520929

fbshipit-source-id: 884f78aa9ce548f0fa168876720cfe49d53f9c18
  • Loading branch information
Roy Chan authored and facebook-github-bot committed Nov 6, 2024
1 parent 57844aa commit 23c24c6
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions kats/models/ml_ar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1091,23 +1091,21 @@ def _train(
self.train_data_in = in_data[train_index, :]
self.train_data = meta_and_out_data.loc[train_index]
normalized_train_y = meta_and_out_data["output"].loc[train_index]
lgb_params = {
"n_jobs": self.params.n_jobs,
"max_depth": self.params.max_depth,
"min_data_in_leaf": self.params.min_data_in_leaf,
"num_leaves": self.params.num_leaves,
"subsample": self.params.subsample,
"n_estimators": self.params.n_estimators,
"learning_rate": self.params.learning_rate,
"colsample_bytree": self.params.colsample_bytree,
"boosting_type": self.params.boosting_type,
"alpha": self.params.alpha,
"random_state": self.params.random_state,
"verbose": self.params.verbose,
}

regr = gbm.LGBMRegressor(
objective=self.params.objective,
**lgb_params,
n_jobs=self.params.n_jobs,
max_depth=self.params.max_depth,
min_data_in_leaf=self.params.min_data_in_leaf,
num_leaves=self.params.num_leaves,
subsample=self.params.subsample,
n_estimators=self.params.n_estimators,
learning_rate=self.params.learning_rate,
colsample_bytree=self.params.colsample_bytree,
boosting_type=self.params.boosting_type,
alpha=self.params.alpha,
random_state=self.params.random_state,
verbose=self.params.verbose,
)

train_rows = self.train_data_in.shape[0]
Expand Down

0 comments on commit 23c24c6

Please sign in to comment.