Bharath Kumar L
Bharath Kumar L

Reputation: 118

BaseException when trying to import azureml-train-automl-runtime in windows 10

I am trying import azureml-train-automl-runtime to do explanations from azure automl pipeline. But I am getting the below error


Exception ignored in: <function _Win32Helper.del at 0x0000021ECA3AD430> Traceback (most recent call last): File "C:\Anaconda3\envs\check_win32_error\lib\site-packages\azureml\automl\runtime\shared\win32_helper.py", line 246, in del TypeError: catching classes that do not inherit from BaseException is not allowed


Pip Freeze Output

adal==1.2.7
applicationinsights==0.11.10
argcomplete==2.0.0
attrs==22.1.0
azure-common==1.1.28
azure-core==1.26.0
azure-graphrbac==0.61.1
azure-identity==1.7.0
azure-mgmt-authorization==2.0.0
azure-mgmt-containerregistry==10.0.0
azure-mgmt-core==1.3.2
azure-mgmt-keyvault==10.1.0
azure-mgmt-resource==21.2.1
azure-mgmt-storage==20.0.0
azure-storage-blob==12.13.0
azure-storage-queue==12.5.0
azureml-automl-core==1.46.1.post1
azureml-automl-runtime==1.46.1.post1
azureml-core==1.46.0
azureml-dataprep==4.5.7
azureml-dataprep-native==38.0.0
azureml-dataprep-rslex==2.11.4
azureml-dataset-runtime==1.46.0
azureml-interpret==1.46.0
azureml-mlflow==1.46.0
azureml-telemetry==1.46.0
azureml-train-automl-client==1.46.0
azureml-train-automl-runtime==1.46.1.post1
azureml-train-core==1.46.0
azureml-train-restclients-hyperdrive==1.46.0
azureml-training-tabular==1.46.1.post1
backports.tempfile==1.0
backports.weakref==1.0.post1
bcrypt==4.0.1
bokeh==2.4.3
boto==2.49.0
boto3==1.20.19
botocore==1.23.19
certifi @ file:///C:/b/abs_ac29jvt43w/croot/certifi_1665076682579/work/certifi
cffi==1.15.1
charset-normalizer==2.1.1
click==8.1.3
cloudpickle==2.2.0
colorama==0.4.5
contextlib2==21.6.0
cryptography==37.0.4
Cython==0.29.14
dask==2.30.0
databricks-cli==0.17.3
dataclasses==0.6
dill==0.3.5.1
distributed==2.30.1
distro==1.8.0
docker==5.0.3
dotnetcore2==3.1.23
entrypoints==0.4
fire==0.4.0
flatbuffers==22.9.24
fsspec==2022.10.0
fusepy==3.0.1
gensim==3.8.3
gitdb==4.0.9
GitPython==3.1.29
HeapDict==1.0.1
humanfriendly==10.0
idna==3.4
importlib-metadata==5.0.0
importlib-resources==5.10.0
interpret-community==0.27.0
interpret-core==0.2.7
isodate==0.6.1
jeepney==0.8.0
Jinja2==2.11.2
jmespath==0.10.0
joblib==0.14.1
jsonpickle==2.2.0
jsonschema==4.16.0
keras2onnx==1.6.0
knack==0.9.0
lightgbm==3.2.1
llvmlite==0.38.1
locket==1.0.0
MarkupSafe==2.0.1
ml-wrappers==0.2.2
mlflow-skinny==1.30.0
msal==1.20.0
msal-extensions==0.3.1
msgpack==1.0.4
msrest==0.7.1
msrestazure==0.6.4
ndg-httpsclient==0.5.1
nimbusml==1.8.0
numba==0.55.2
numpy==1.22.3
oauthlib==3.2.2
onnx==1.12.0
onnxconverter-common==1.6.0
onnxmltools==1.4.1
onnxruntime==1.11.1
packaging==21.3
pandas==1.1.5
paramiko==2.11.0
partd==1.3.0
pathspec==0.10.1
patsy==0.5.3
Pillow==9.2.0
pkginfo==1.8.3
pkgutil_resolve_name==1.3.10
pmdarima==1.7.1
portalocker==2.6.0
protobuf==3.20.1
psutil==5.9.3
pyarrow==9.0.0
pyasn1==0.4.8
pycparser==2.21
Pygments==2.13.0
PyJWT==2.6.0
PyNaCl==1.5.0
pyOpenSSL==22.0.0
pyparsing==3.0.9
pyreadline3==3.4.1
pyrsistent==0.18.1
PySocks==1.7.1
python-dateutil==2.8.2
pytz==2022.5
pywin32==227
PyYAML==6.0
requests==2.28.1
requests-oauthlib==1.3.1
s3transfer==0.5.2
scikit-learn==0.22.2.post1
scipy==1.5.3
SecretStorage==3.3.3
shap==0.39.0
six==1.16.0
skl2onnx==1.4.9
sklearn-pandas==1.7.0
slicer==0.0.7
smart-open==1.9.0
smmap==5.0.0
sortedcontainers==2.4.0
sqlparse==0.4.3
statsmodels==0.11.1
tabulate==0.9.0
tblib==1.7.0
termcolor==2.0.1
toolz==0.12.0
tornado==6.2
tqdm==4.64.1
typing_extensions==4.4.0
urllib3==1.26.12
websocket-client==1.4.1
wincertstore==0.2
zict==2.2.0
zipp==3.9.0

Python Script


import traceback

try:
    from azureml.train.automl.runtime.automl_explain_utilities import automl_setup_model_explanations
except:
    tb = traceback.format_exc()
    print(tb)

Error Screenshot


enter image description here

Upvotes: 0

Views: 498

Answers (1)

Sairam Tadepalli
Sairam Tadepalli

Reputation: 1683

Inheritance is the issue that happened. The library which needs to be imported need to be inherited to use. Run the pipeline with the inherited pattern in the code block.

class automl_setup_model_explanations (AutoMLExplainerSetupClass):
    pass 

return AutoMLExplainerSetupClass

The implementation will be made with the inheriting class. Without class inheritance we cannot use the imported model explanations.

The traceback error has occurred due to not having inheritance.

Upvotes: 0

Related Questions