Skip to content

Commit

Permalink
Lowercase colname before features table lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
bdewilde committed Dec 21, 2024
1 parent a3f8a6a commit 181ddd5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/student_success_tool/modeling/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ def select_top_features_for_display(
zip(top_features, top_feature_values, top_shap_values), start=1
):
feature_name = (
features_table.get(feature, {}).get("name", feature)
# HACK: lowercase feature column name in features table lookup
# TODO: we should *ensure* feature column names are lowercased
# before using them in a model; current behavior should be considered a bug
features_table.get(feature.lower(), {}).get("name", feature)
if features_table is not None
else feature
)
Expand Down

0 comments on commit 181ddd5

Please sign in to comment.