Skip to content

Commit

Permalink
[#161, #162] Match up the "missing module" error messages for xgboost…
Browse files Browse the repository at this point in the history
… and lightgbm
  • Loading branch information
riley-harper committed Nov 22, 2024
1 parent 6ae1f4e commit 987f71c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hlink/linking/core/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def choose_classifier(model_type, params, dep_var):
elif model_type == "lightgbm":
if not _lightgbm_available:
raise ModuleNotFoundError(
"model_type 'lightgbm' requires the synapseml python package for LightGBM-Spark integration"
"To use the 'lightgbm' model type, you need to install the synapseml "
"Python package, which provides LightGBM-Spark integration, and "
"its dependencies. Try installing hlink with the lightgbm extra: "
"\n\n pip install hlink[lightgbm]"
)
params_without_threshold = {
key: val
Expand All @@ -134,7 +137,7 @@ def choose_classifier(model_type, params, dep_var):
raise ModuleNotFoundError(
"To use the experimental 'xgboost' model type, you need to install "
"the xgboost library and its dependencies. Try installing hlink with "
"the xgboost extra: 'pip install hlink[xgboost]'."
"the xgboost extra:\n\n pip install hlink[xgboost]"
)
params_without_threshold = {
key: val
Expand Down

0 comments on commit 987f71c

Please sign in to comment.