diff --git a/how-to-use-azureml/automated-machine-learning/classification-bank-marketing-all-features/auto-ml-classification-bank-marketing-all-features.yml b/how-to-use-azureml/automated-machine-learning/classification-bank-marketing-all-features/auto-ml-classification-bank-marketing-all-features.yml index 3c60ea204..8e1fe45e9 100644 --- a/how-to-use-azureml/automated-machine-learning/classification-bank-marketing-all-features/auto-ml-classification-bank-marketing-all-features.yml +++ b/how-to-use-azureml/automated-machine-learning/classification-bank-marketing-all-features/auto-ml-classification-bank-marketing-all-features.yml @@ -5,7 +5,6 @@ dependencies: - azureml-train-automl - azureml-widgets - matplotlib - - interpret - onnxruntime==1.0.0 - azureml-explain-model - azureml-contrib-interpret diff --git a/how-to-use-azureml/automated-machine-learning/classification-credit-card-fraud/auto-ml-classification-credit-card-fraud.ipynb b/how-to-use-azureml/automated-machine-learning/classification-credit-card-fraud/auto-ml-classification-credit-card-fraud.ipynb index 46eade829..f1002e5f8 100644 --- a/how-to-use-azureml/automated-machine-learning/classification-credit-card-fraud/auto-ml-classification-credit-card-fraud.ipynb +++ b/how-to-use-azureml/automated-machine-learning/classification-credit-card-fraud/auto-ml-classification-credit-card-fraud.ipynb @@ -122,35 +122,22 @@ "metadata": {}, "outputs": [], "source": [ - "from azureml.core.compute import AmlCompute\n", - "from azureml.core.compute import ComputeTarget\n", + "from azureml.core.compute import ComputeTarget, AmlCompute\n", + "from azureml.core.compute_target import ComputeTargetException\n", "\n", - "# Choose a name for your AmlCompute cluster.\n", - "amlcompute_cluster_name = \"cpu-cluster-1\"\n", + "# Choose a name for your CPU cluster\n", + "cpu_cluster_name = \"cpu-cluster-1\"\n", "\n", - "found = False\n", - "# Check if this compute target already exists in the workspace.\n", - "cts = ws.compute_targets\n", - "if amlcompute_cluster_name in cts and cts[amlcompute_cluster_name].type == 'cpu-cluster-1':\n", - " found = True\n", - " print('Found existing compute target.')\n", - " compute_target = cts[amlcompute_cluster_name]\n", - " \n", - "if not found:\n", - " print('Creating a new compute target...')\n", - " provisioning_config = AmlCompute.provisioning_configuration(vm_size = \"STANDARD_DS12_V2\", # for GPU, use \"STANDARD_NC6\"\n", - " #vm_priority = 'lowpriority', # optional\n", - " max_nodes = 6)\n", + "# Verify that cluster does not exist already\n", + "try:\n", + " compute_target = ComputeTarget(workspace=ws, name=cpu_cluster_name)\n", + " print('Found existing cluster, use it.')\n", + "except ComputeTargetException:\n", + " compute_config = AmlCompute.provisioning_configuration(vm_size='STANDARD_DS12_V2',\n", + " max_nodes=6)\n", + " compute_target = ComputeTarget.create(ws, cpu_cluster_name, compute_config)\n", "\n", - " # Create the cluster.\n", - " compute_target = ComputeTarget.create(ws, amlcompute_cluster_name, provisioning_config)\n", - " \n", - "print('Checking cluster status...')\n", - "# Can poll for a minimum number of nodes and for a specific timeout.\n", - "# If no min_node_count is provided, it will use the scale settings for the cluster.\n", - "compute_target.wait_for_completion(show_output = True, min_node_count = None, timeout_in_minutes = 20)\n", - "\n", - "# For a more detailed view of current AmlCompute status, use get_status()." + "compute_target.wait_for_completion(show_output=True)" ] }, { diff --git a/how-to-use-azureml/automated-machine-learning/classification-credit-card-fraud/auto-ml-classification-credit-card-fraud.yml b/how-to-use-azureml/automated-machine-learning/classification-credit-card-fraud/auto-ml-classification-credit-card-fraud.yml index 8821c2195..e7efac0ec 100644 --- a/how-to-use-azureml/automated-machine-learning/classification-credit-card-fraud/auto-ml-classification-credit-card-fraud.yml +++ b/how-to-use-azureml/automated-machine-learning/classification-credit-card-fraud/auto-ml-classification-credit-card-fraud.yml @@ -5,5 +5,4 @@ dependencies: - azureml-train-automl - azureml-widgets - matplotlib - - interpret - azureml-explain-model diff --git a/how-to-use-azureml/automated-machine-learning/forecasting-beer-remote/auto-ml-forecasting-beer-remote.yml b/how-to-use-azureml/automated-machine-learning/forecasting-beer-remote/auto-ml-forecasting-beer-remote.yml index 1a0a93ff5..34f40ac12 100644 --- a/how-to-use-azureml/automated-machine-learning/forecasting-beer-remote/auto-ml-forecasting-beer-remote.yml +++ b/how-to-use-azureml/automated-machine-learning/forecasting-beer-remote/auto-ml-forecasting-beer-remote.yml @@ -1,10 +1,9 @@ name: auto-ml-forecasting-beer-remote dependencies: -- fbprophet==0.5 -- numpy==1.16.2 - py-xgboost<=0.90 - pip: - azureml-sdk + - numpy==1.16.2 - azureml-train-automl - azureml-widgets - matplotlib diff --git a/how-to-use-azureml/automated-machine-learning/forecasting-bike-share/auto-ml-forecasting-bike-share.yml b/how-to-use-azureml/automated-machine-learning/forecasting-bike-share/auto-ml-forecasting-bike-share.yml index d8ad2181b..ab93efbec 100644 --- a/how-to-use-azureml/automated-machine-learning/forecasting-bike-share/auto-ml-forecasting-bike-share.yml +++ b/how-to-use-azureml/automated-machine-learning/forecasting-bike-share/auto-ml-forecasting-bike-share.yml @@ -1,10 +1,9 @@ name: auto-ml-forecasting-bike-share dependencies: -- fbprophet==0.5 -- numpy==1.16.2 - py-xgboost<=0.90 - pip: - azureml-sdk + - numpy==1.16.2 - azureml-train-automl - azureml-widgets - matplotlib diff --git a/how-to-use-azureml/automated-machine-learning/forecasting-energy-demand/auto-ml-forecasting-energy-demand.yml b/how-to-use-azureml/automated-machine-learning/forecasting-energy-demand/auto-ml-forecasting-energy-demand.yml index 8c42187c2..2fef31b84 100644 --- a/how-to-use-azureml/automated-machine-learning/forecasting-energy-demand/auto-ml-forecasting-energy-demand.yml +++ b/how-to-use-azureml/automated-machine-learning/forecasting-energy-demand/auto-ml-forecasting-energy-demand.yml @@ -2,9 +2,9 @@ name: auto-ml-forecasting-energy-demand dependencies: - pip: - azureml-sdk + - numpy==1.16.2 - azureml-train-automl - azureml-widgets - matplotlib - - interpret - azureml-explain-model - azureml-contrib-interpret diff --git a/how-to-use-azureml/automated-machine-learning/forecasting-high-frequency/auto-ml-forecasting-function.yml b/how-to-use-azureml/automated-machine-learning/forecasting-high-frequency/auto-ml-forecasting-function.yml index a46c0195f..7a258f0c3 100644 --- a/how-to-use-azureml/automated-machine-learning/forecasting-high-frequency/auto-ml-forecasting-function.yml +++ b/how-to-use-azureml/automated-machine-learning/forecasting-high-frequency/auto-ml-forecasting-function.yml @@ -1,10 +1,9 @@ name: auto-ml-forecasting-function dependencies: -- fbprophet==0.5 -- numpy==1.16.2 - py-xgboost<=0.90 - pip: - azureml-sdk + - numpy==1.16.2 - azureml-train-automl - azureml-widgets - matplotlib diff --git a/how-to-use-azureml/automated-machine-learning/forecasting-orange-juice-sales/auto-ml-forecasting-orange-juice-sales.yml b/how-to-use-azureml/automated-machine-learning/forecasting-orange-juice-sales/auto-ml-forecasting-orange-juice-sales.yml index cec567dd7..7d20e1741 100644 --- a/how-to-use-azureml/automated-machine-learning/forecasting-orange-juice-sales/auto-ml-forecasting-orange-juice-sales.yml +++ b/how-to-use-azureml/automated-machine-learning/forecasting-orange-juice-sales/auto-ml-forecasting-orange-juice-sales.yml @@ -1,10 +1,9 @@ name: auto-ml-forecasting-orange-juice-sales dependencies: -- fbprophet==0.5 -- numpy==1.16.2 - py-xgboost<=0.90 - pip: - azureml-sdk + - numpy==1.16.2 - pandas==0.23.4 - azureml-train-automl - azureml-widgets diff --git a/how-to-use-azureml/automated-machine-learning/local-run-classification-credit-card-fraud/auto-ml-classification-credit-card-fraud-local.ipynb b/how-to-use-azureml/automated-machine-learning/local-run-classification-credit-card-fraud/auto-ml-classification-credit-card-fraud-local.ipynb index 9d41f3a33..2fbcf8581 100644 --- a/how-to-use-azureml/automated-machine-learning/local-run-classification-credit-card-fraud/auto-ml-classification-credit-card-fraud-local.ipynb +++ b/how-to-use-azureml/automated-machine-learning/local-run-classification-credit-card-fraud/auto-ml-classification-credit-card-fraud-local.ipynb @@ -49,8 +49,8 @@ "2. Configure AutoML using `AutoMLConfig`.\n", "3. Train the model.\n", "4. Explore the results.\n", - "5. Visualization model's feature importance in widget\n", - "6. Explore any model's explanation\n", + "5. Visualization model's feature importance in azure portal\n", + "6. Explore any model's explanation and explore feature importance in azure portal\n", "7. Test the fitted model." ] }, @@ -272,7 +272,7 @@ "Retrieve the explanation from the best_run which includes explanations for engineered features and raw features.\n", "\n", "#### Download engineered feature importance from artifact store\n", - "You can use ExplanationClient to download the engineered feature explanations from the artifact store of the best_run." + "You can use ExplanationClient to download the engineered feature explanations from the artifact store of the best_run. You can also use azure portal url to view the dash board visualization of the feature importance values of the engineered features." ] }, { @@ -283,7 +283,8 @@ "source": [ "client = ExplanationClient.from_run(best_run)\n", "engineered_explanations = client.download_model_explanation(raw=False)\n", - "print(engineered_explanations.get_feature_importance_dict())" + "print(engineered_explanations.get_feature_importance_dict())\n", + "print(\"You can visualize the engineered explanations under the 'Explanations (preview)' tab in the AutoML run at:-\\n\" + best_run.get_portal_url())" ] }, { @@ -376,7 +377,7 @@ "metadata": {}, "source": [ "#### Use Mimic Explainer for computing and visualizing engineered feature importance\n", - "The explain() method in MimicWrapper can be called with the transformed test samples to get the feature importance for the generated engineered features." + "The explain() method in MimicWrapper can be called with the transformed test samples to get the feature importance for the generated engineered features. You can also use azure portal url to view the dash board visualization of the feature importance values of the engineered features." ] }, { @@ -386,7 +387,8 @@ "outputs": [], "source": [ "engineered_explanations = explainer.explain(['local', 'global'], eval_dataset=automl_explainer_setup_obj.X_test_transform)\n", - "print(engineered_explanations.get_feature_importance_dict())\n" + "print(engineered_explanations.get_feature_importance_dict())\n", + "print(\"You can visualize the engineered explanations under the 'Explanations (preview)' tab in the AutoML run at:-\\n\" + automl_run.get_portal_url())" ] }, { diff --git a/how-to-use-azureml/automated-machine-learning/local-run-classification-credit-card-fraud/auto-ml-classification-credit-card-fraud-local.yml b/how-to-use-azureml/automated-machine-learning/local-run-classification-credit-card-fraud/auto-ml-classification-credit-card-fraud-local.yml index 204665da0..26b9756d1 100644 --- a/how-to-use-azureml/automated-machine-learning/local-run-classification-credit-card-fraud/auto-ml-classification-credit-card-fraud-local.yml +++ b/how-to-use-azureml/automated-machine-learning/local-run-classification-credit-card-fraud/auto-ml-classification-credit-card-fraud-local.yml @@ -5,5 +5,4 @@ dependencies: - azureml-train-automl - azureml-widgets - matplotlib - - interpret - azureml-explain-model diff --git a/how-to-use-azureml/automated-machine-learning/regression-hardware-performance-explanation-and-featurization/auto-ml-regression-hardware-performance-explanation-and-featurization.ipynb b/how-to-use-azureml/automated-machine-learning/regression-hardware-performance-explanation-and-featurization/auto-ml-regression-hardware-performance-explanation-and-featurization.ipynb index 71e53b515..31c342954 100644 --- a/how-to-use-azureml/automated-machine-learning/regression-hardware-performance-explanation-and-featurization/auto-ml-regression-hardware-performance-explanation-and-featurization.ipynb +++ b/how-to-use-azureml/automated-machine-learning/regression-hardware-performance-explanation-and-featurization/auto-ml-regression-hardware-performance-explanation-and-featurization.ipynb @@ -51,8 +51,8 @@ "4. Explore the results and featurization transparency options\n", "5. Setup remote compute for computing the model explanations for a given AutoML model.\n", "6. Start an AzureML experiment on your remote compute to compute explanations for an AutoML model.\n", - "7. Download the feature importance for engineered features and visualize the explanations for engineered features. \n", - "8. Download the feature importance for raw features and visualize the explanations for raw features. \n" + "7. Download the feature importance for engineered features and visualize the explanations for engineered features on azure portal. \n", + "8. Download the feature importance for raw features and visualize the explanations for raw features on azure portal. \n" ] }, { @@ -598,38 +598,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Feature importance and explanation dashboard\n", - "In this section we describe how you can download the explanation results from the explanations experiment and visualize the feature importance for your AutoML model. " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Setup for visualizing the model explanation results\n", - "For visualizing the explanation results for the *fitted_model* we need to perform the following steps:-\n", - "1. Featurize test data samples.\n", - "\n", - "The *automl_explainer_setup_obj* contains all the structures from above list. " - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "X_test = test_data.drop_columns([label]).to_pandas_dataframe()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from azureml.train.automl.runtime.automl_explain_utilities import AutoMLExplainerSetupClass, automl_setup_model_explanations\n", - "explainer_setup_class = automl_setup_model_explanations(fitted_model, 'regression', X_test=X_test)" + "### Feature importance and visualizing explanation dashboard\n", + "In this section we describe how you can download the explanation results from the explanations experiment and visualize the feature importance for your AutoML model on the azure portal." ] }, { @@ -637,7 +607,7 @@ "metadata": {}, "source": [ "#### Download engineered feature importance from artifact store\n", - "You can use *ExplanationClient* to download the engineered feature explanations from the artifact store of the *automl_run*. You can also use ExplanationDashboard to view the dash board visualization of the feature importance values of the engineered features." + "You can use *ExplanationClient* to download the engineered feature explanations from the artifact store of the *automl_run*. You can also use azure portal url to view the dash board visualization of the feature importance values of the engineered features." ] }, { @@ -647,11 +617,10 @@ "outputs": [], "source": [ "from azureml.explain.model._internal.explanation_client import ExplanationClient\n", - "from interpret_community.widget import ExplanationDashboard\n", "client = ExplanationClient.from_run(automl_run)\n", "engineered_explanations = client.download_model_explanation(raw=False)\n", "print(engineered_explanations.get_feature_importance_dict())\n", - "ExplanationDashboard(engineered_explanations, explainer_setup_class.automl_estimator, datasetX=explainer_setup_class.X_test_transform)" + "print(\"You can visualize the engineered explanations under the 'Explanations (preview)' tab in the AutoML run at:-\\n\" + automl_run.get_portal_url())" ] }, { @@ -659,7 +628,7 @@ "metadata": {}, "source": [ "#### Download raw feature importance from artifact store\n", - "You can use *ExplanationClient* to download the raw feature explanations from the artifact store of the *automl_run*. You can also use ExplanationDashboard to view the dash board visualization of the feature importance values of the raw features." + "You can use *ExplanationClient* to download the raw feature explanations from the artifact store of the *automl_run*. You can also use azure portal url to view the dash board visualization of the feature importance values of the raw features." ] }, { @@ -670,7 +639,7 @@ "source": [ "raw_explanations = client.download_model_explanation(raw=True)\n", "print(raw_explanations.get_feature_importance_dict())\n", - "ExplanationDashboard(raw_explanations, explainer_setup_class.automl_pipeline, datasetX=explainer_setup_class.X_test_raw)" + "print(\"You can visualize the raw explanations under the 'Explanations (preview)' tab in the AutoML run at:-\\n\" + automl_run.get_portal_url())" ] }, { @@ -803,6 +772,7 @@ "outputs": [], "source": [ "if service.state == 'Healthy':\n", + " X_test = test_data.drop_columns([label]).to_pandas_dataframe()\n", " # Serialize the first row of the test data into json\n", " X_test_json = X_test[:1].to_json(orient='records')\n", " print(X_test_json)\n", diff --git a/how-to-use-azureml/automated-machine-learning/regression-hardware-performance-explanation-and-featurization/auto-ml-regression-hardware-performance-explanation-and-featurization.yml b/how-to-use-azureml/automated-machine-learning/regression-hardware-performance-explanation-and-featurization/auto-ml-regression-hardware-performance-explanation-and-featurization.yml index ab735975d..46e526e1c 100644 --- a/how-to-use-azureml/automated-machine-learning/regression-hardware-performance-explanation-and-featurization/auto-ml-regression-hardware-performance-explanation-and-featurization.yml +++ b/how-to-use-azureml/automated-machine-learning/regression-hardware-performance-explanation-and-featurization/auto-ml-regression-hardware-performance-explanation-and-featurization.yml @@ -5,7 +5,6 @@ dependencies: - azureml-train-automl - azureml-widgets - matplotlib - - interpret - azureml-explain-model - azureml-explain-model - azureml-contrib-interpret diff --git a/how-to-use-azureml/explain-model/azure-integration/remote-explanation/explain-model-on-amlcompute.yml b/how-to-use-azureml/explain-model/azure-integration/remote-explanation/explain-model-on-amlcompute.yml index c460bb421..aaa7070f9 100644 --- a/how-to-use-azureml/explain-model/azure-integration/remote-explanation/explain-model-on-amlcompute.yml +++ b/how-to-use-azureml/explain-model/azure-integration/remote-explanation/explain-model-on-amlcompute.yml @@ -2,7 +2,6 @@ name: explain-model-on-amlcompute dependencies: - pip: - azureml-sdk - - interpret - azureml-interpret - azureml-contrib-interpret - sklearn-pandas diff --git a/how-to-use-azureml/explain-model/azure-integration/run-history/save-retrieve-explanations-run-history.yml b/how-to-use-azureml/explain-model/azure-integration/run-history/save-retrieve-explanations-run-history.yml index e6f99504d..2dee986fa 100644 --- a/how-to-use-azureml/explain-model/azure-integration/run-history/save-retrieve-explanations-run-history.yml +++ b/how-to-use-azureml/explain-model/azure-integration/run-history/save-retrieve-explanations-run-history.yml @@ -2,7 +2,6 @@ name: save-retrieve-explanations-run-history dependencies: - pip: - azureml-sdk - - interpret - azureml-interpret - azureml-contrib-interpret - ipywidgets diff --git a/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-locally-and-deploy.yml b/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-locally-and-deploy.yml index 000daa741..7236444a6 100644 --- a/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-locally-and-deploy.yml +++ b/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-locally-and-deploy.yml @@ -2,7 +2,6 @@ name: train-explain-model-locally-and-deploy dependencies: - pip: - azureml-sdk - - interpret - azureml-interpret - azureml-contrib-interpret - sklearn-pandas diff --git a/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-on-amlcompute-and-deploy.yml b/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-on-amlcompute-and-deploy.yml index 2905fd700..ab91cef6f 100644 --- a/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-on-amlcompute-and-deploy.yml +++ b/how-to-use-azureml/explain-model/azure-integration/scoring-time/train-explain-model-on-amlcompute-and-deploy.yml @@ -2,7 +2,6 @@ name: train-explain-model-on-amlcompute-and-deploy dependencies: - pip: - azureml-sdk - - interpret - azureml-interpret - azureml-contrib-interpret - sklearn-pandas