amazon-sagemaker-examples
amazon-sagemaker-examples copied to clipboard
[Bug Report] trial.collection('feature_importance") not giving all values
Link to the notebook https://github.com/aws/amazon-sagemaker-examples/blob/main/sagemaker-debugger/xgboost_census_explanations/xgboost-census-debugger-rules.ipynb
Describe the bug
The dataset for this Notebook has 11 features, however, plot_feature_importance(trial, importance_type="cover")
only shows 6 of them. (Same if using another importance_type)
I found that this happens because, in plot_collection(...)
the call to trial.collection('feature_importance")
only returns these 6 values.
I've changed, in plot_collection(...)
the line:
tensors = trial.collection(collection_name).tensor_names
for:
tensors = trial.tensor_names()
And it works for feature_importance, but this gives error for metrics and average_shap collections.
Why does trial.collection('feature_importance")
doesn't return all values for all features?
To reproduce
Simply execute the Notebook.
plot_feature_importance(trial, importance_type="cover")
plots 6 lines, when there's 11 features in the dataset