Skip to content

Commit

Permalink
Merge pull request #36 from TobyBoyne/master
Browse files Browse the repository at this point in the history
Fix categorical feature bug with LGBM v4.1+
  • Loading branch information
TobyBoyne authored Jun 21, 2024
2 parents 7e2e50e + ead026a commit 5d7003d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions entmoot/models/mean_models/tree_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,14 @@ def _train_lgbm(self, X, y):
train_data = lgb.Dataset(
X,
label=y,
categorical_feature=self._problem_config.cat_idx,
categorical_feature=list(self._problem_config.cat_idx),
free_raw_data=False,
params={"verbose": -1},
)

tree_model = lgb.train(
self._train_params,
train_data,
categorical_feature=self._problem_config.cat_idx,
#verbose_eval=False,
)
else:
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy<2.0.0
lightgbm==4.0.0
lightgbm>=4.0.0
pyomo
gurobipy
pytest-cov
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy<2.0.0
lightgbm==4.0.0
lightgbm>=4.0.0
gurobipy
pyomo

0 comments on commit 5d7003d

Please sign in to comment.