From 6abc478f33b42c7e75bc671a622b3bfb045205d6 Mon Sep 17 00:00:00 2001 From: Jeff Shepherd Date: Tue, 2 Apr 2019 16:23:11 -0700 Subject: [PATCH 1/2] Removed automl_setup_linux.sh --- .../automl_setup_linux.sh | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 how-to-use-azureml/automated-machine-learning/automl_setup_linux.sh diff --git a/how-to-use-azureml/automated-machine-learning/automl_setup_linux.sh b/how-to-use-azureml/automated-machine-learning/automl_setup_linux.sh deleted file mode 100644 index cd760ab0..00000000 --- a/how-to-use-azureml/automated-machine-learning/automl_setup_linux.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -CONDA_ENV_NAME=$1 -AUTOML_ENV_FILE=$2 -OPTIONS=$3 -PIP_NO_WARN_SCRIPT_LOCATION=0 - -if [ "$CONDA_ENV_NAME" == "" ] -then - CONDA_ENV_NAME="azure_automl" -fi - -if [ "$AUTOML_ENV_FILE" == "" ] -then - AUTOML_ENV_FILE="automl_env.yml" -fi - -if [ ! -f $AUTOML_ENV_FILE ]; then - echo "File $AUTOML_ENV_FILE not found" - exit 1 -fi - -if source activate $CONDA_ENV_NAME 2> /dev/null -then - echo "Upgrading azureml-sdk[automl,notebooks,explain] in existing conda environment" $CONDA_ENV_NAME - pip install --upgrade azureml-sdk[automl,notebooks,explain] && - jupyter nbextension uninstall --user --py azureml.widgets -else - conda env create -f $AUTOML_ENV_FILE -n $CONDA_ENV_NAME && - source activate $CONDA_ENV_NAME && - python -m ipykernel install --user --name $CONDA_ENV_NAME --display-name "Python ($CONDA_ENV_NAME)" && - jupyter nbextension uninstall --user --py azureml.widgets && - echo "" && - echo "" && - echo "***************************************" && - echo "* AutoML setup completed successfully *" && - echo "***************************************" && - if [ "$OPTIONS" != "nolaunch" ] - then - echo "" && - echo "Starting jupyter notebook - please run the configuration notebook" && - echo "" && - jupyter notebook --log-level=50 --notebook-dir '../..' - fi -fi - -if [ $? -gt 0 ] -then - echo "Installation failed" -fi - - From 3b488555e54f2bbdffd00db56cd49bb0ff4d3eea Mon Sep 17 00:00:00 2001 From: Jeff Shepherd Date: Tue, 2 Apr 2019 16:24:05 -0700 Subject: [PATCH 2/2] Added back automl_setup_linux.sh with correct line termination --- .../automl_setup_linux.sh | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 how-to-use-azureml/automated-machine-learning/automl_setup_linux.sh diff --git a/how-to-use-azureml/automated-machine-learning/automl_setup_linux.sh b/how-to-use-azureml/automated-machine-learning/automl_setup_linux.sh new file mode 100644 index 00000000..db8a357c --- /dev/null +++ b/how-to-use-azureml/automated-machine-learning/automl_setup_linux.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +CONDA_ENV_NAME=$1 +AUTOML_ENV_FILE=$2 +OPTIONS=$3 +PIP_NO_WARN_SCRIPT_LOCATION=0 + +if [ "$CONDA_ENV_NAME" == "" ] +then + CONDA_ENV_NAME="azure_automl" +fi + +if [ "$AUTOML_ENV_FILE" == "" ] +then + AUTOML_ENV_FILE="automl_env.yml" +fi + +if [ ! -f $AUTOML_ENV_FILE ]; then + echo "File $AUTOML_ENV_FILE not found" + exit 1 +fi + +if source activate $CONDA_ENV_NAME 2> /dev/null +then + echo "Upgrading azureml-sdk[automl,notebooks,explain] in existing conda environment" $CONDA_ENV_NAME + pip install --upgrade azureml-sdk[automl,notebooks,explain] && + jupyter nbextension uninstall --user --py azureml.widgets +else + conda env create -f $AUTOML_ENV_FILE -n $CONDA_ENV_NAME && + source activate $CONDA_ENV_NAME && + python -m ipykernel install --user --name $CONDA_ENV_NAME --display-name "Python ($CONDA_ENV_NAME)" && + jupyter nbextension uninstall --user --py azureml.widgets && + echo "" && + echo "" && + echo "***************************************" && + echo "* AutoML setup completed successfully *" && + echo "***************************************" && + if [ "$OPTIONS" != "nolaunch" ] + then + echo "" && + echo "Starting jupyter notebook - please run the configuration notebook" && + echo "" && + jupyter notebook --log-level=50 --notebook-dir '../..' + fi +fi + +if [ $? -gt 0 ] +then + echo "Installation failed" +fi + +