Merge pull request #53 from rastala/master

Update automl setup
This commit is contained in:
Roope Astala
2018-10-17 17:38:28 -04:00
committed by GitHub
4 changed files with 44 additions and 12 deletions

View File

@@ -5,15 +5,15 @@ dependencies:
- python=3.6
- nb_conda
- matplotlib
- numpy>=1.11.0,<1.16.0
- numpy>=1.11.0,<1.15.0
- cython
- urllib3<1.24
- scipy>=0.19.0,<0.20.0
- scikit-learn>=0.18.0,<=0.19.1
- pandas>=0.22.0,<0.23.0
- pip:
# Required packages for AzureML execution, history, and data preparation.
- --extra-index-url https://pypi.python.org/simple
- azureml-sdk[automl]
- azureml-train-widgets
- azureml-sdk[automl,notebooks]
- pandas_ml

View File

@@ -1,16 +1,21 @@
@echo off
set conda_env_name=%1
set automl_env_file=%2
set PIP_NO_WARN_SCRIPT_LOCATION=0
IF "%conda_env_name%"=="" SET conda_env_name="azure_automl"
IF "%automl_env_file%"=="" SET automl_env_file="automl_env.yml"
IF NOT EXIST %automl_env_file% GOTO YmlMissing
call conda activate %conda_env_name% 2>nul:
if not errorlevel 1 (
echo Upgrading azureml-sdk[automl] in existing conda environment %conda_env_name%
call pip install --upgrade azureml-sdk[automl]
call pip install --upgrade azureml-sdk[automl,notebooks]
if errorlevel 1 goto ErrorExit
) else (
call conda env create -f automl_env.yml -n %conda_env_name%
call conda env create -f %automl_env_file% -n %conda_env_name%
)
call conda activate %conda_env_name% 2>nul:
@@ -18,10 +23,10 @@ if errorlevel 1 goto ErrorExit
call pip install psutil
call jupyter nbextension install --py azureml.train.widgets
call jupyter nbextension install --py azureml.train.widgets --user
if errorlevel 1 goto ErrorExit
call jupyter nbextension enable --py azureml.train.widgets
call jupyter nbextension enable --py azureml.train.widgets --user
if errorlevel 1 goto ErrorExit
echo.
@@ -36,6 +41,9 @@ jupyter notebook --log-level=50
goto End
:YmlMissing
echo File %automl_env_file% not found.
:ErrorExit
echo Install failed

View File

@@ -1,18 +1,30 @@
#!/bin/bash
CONDA_ENV_NAME=$1
AUTOML_ENV_FILE=$2
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] in existing conda environment" $CONDA_ENV_NAME
pip install --upgrade azureml-sdk[automl]
pip install --upgrade azureml-sdk[automl,notebooks]
else
conda env create -f automl_env.yml -n $CONDA_ENV_NAME &&
conda env create -f $AUTOML_ENV_FILE -n $CONDA_ENV_NAME &&
source activate $CONDA_ENV_NAME &&
jupyter nbextension install --py azureml.train.widgets --user &&
jupyter nbextension enable --py azureml.train.widgets --user &&

View File

@@ -1,18 +1,30 @@
#!/bin/bash
CONDA_ENV_NAME=$1
AUTOML_ENV_FILE=$2
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] in existing conda environment" $CONDA_ENV_NAME
pip install --upgrade azureml-sdk[automl]
pip install --upgrade azureml-sdk[automl,notebooks]
else
conda env create -f automl_env.yml -n $CONDA_ENV_NAME &&
conda env create -f $AUTOML_ENV_FILE -n $CONDA_ENV_NAME &&
source activate $CONDA_ENV_NAME &&
conda install lightgbm -c conda-forge -y &&
jupyter nbextension install --py azureml.train.widgets --user &&