Skip to content

Commit

Permalink
[#161] Update test to check xgboost training_feature_importances
Browse files Browse the repository at this point in the history
xgboost has a different setup for feature importances, so the current logic
ignores it. We'll need to update the save model metadata step to include logic
specifically for xgboost.
  • Loading branch information
riley-harper committed Nov 18, 2024
1 parent 88d7199 commit 97aa7e2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hlink/tests/training_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,14 @@ def test_step_3_with_xgboost_model(
training.run_step(2)
training.run_step(3)

importances_df = spark.table("training_feature_importances")
assert importances_df.columns == [
"feature_name",
"category",
"weight",
"average_gain_per_split",
]


def test_step_3_requires_table(training_conf, training):
training_conf["training"]["feature_importances"] = True
Expand Down

0 comments on commit 97aa7e2

Please sign in to comment.