Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'azureml.explain' #172

Closed
Zhangsz95 opened this issue Jan 17, 2019 — with docs.microsoft.com · 1 comment
Closed

ModuleNotFoundError: No module named 'azureml.explain' #172

Zhangsz95 opened this issue Jan 17, 2019 — with docs.microsoft.com · 1 comment

Comments

Copy link

code:
from azureml.train.automl.automlexplainer import explain_model
shap_values,expected_values,overall_summary,overall_imp,per_class_summary,per_class_imp=explain_model(fitted_model, x_train, x_test)
#Overall feature importance
print(overall_imp)
print(overall_summary)
#Class-level feature importance
print(per_class_imp)
print(per_class_summary)

result:

ModuleNotFoundError Traceback (most recent call last)
<ipython-input-41-fc557da69821> in <module>
2 from azureml.train.automl.automlexplainer import explain_model
3
----> 4 shap_values,expected_values,overall_summary,overall_imp,per_class_summary,per_class_imp=explain_model(fitted_model, x_train, x_test)
5 #Overall feature importance
6 print(overall_imp)

~/anaconda3_501/lib/python3.6/site-packages/azureml/train/automl/automlexplainer.py in explain_model(fitted_model, X_train, X_test, best_run, features, **kwargs)
73 return _convert_explanation(explanation)
74 except ImportError as import_error:
---> 75 raise import_error
76
77

~/anaconda3_501/lib/python3.6/site-packages/azureml/train/automl/automlexplainer.py in explain_model(fitted_model, X_train, X_test, best_run, features, **kwargs)
41
42 try:
---> 43 from azureml.explain.model._internal import TabularExplainer
44
45 # Transform the dataset for datatransformer and laggingtransformer only

ModuleNotFoundError: No module named 'azureml.explain'


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@rastala
Copy link
Member

rastala commented Jan 18, 2019

Try installing the explainability extra using pip install azureml-sdk[explain]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants