Skip to content

Commit cb5a178

Browse files
committed
Merge branch 'master' of github.com:rastala/MachineLearningNotebooks
2 parents d81c336 + 6b8a6be commit cb5a178

File tree

5 files changed

+203
-0
lines changed

5 files changed

+203
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: azure_automl
2+
dependencies:
3+
# The python interpreter version.
4+
# Currently Azure ML only supports 3.5.2 and later.
5+
- python>=3.5.2,<3.6.8
6+
- nb_conda
7+
- matplotlib==2.1.0
8+
- numpy>=1.11.0,<1.15.0
9+
- cython
10+
- urllib3<1.24
11+
- scipy>=1.0.0,<=1.1.0
12+
- scikit-learn>=0.18.0,<=0.19.1
13+
- pandas>=0.22.0,<0.23.0
14+
- tensorflow>=1.12.0
15+
- py-xgboost<=0.80
16+
17+
- pip:
18+
# Required packages for AzureML execution, history, and data preparation.
19+
- azureml-sdk[automl,explain]
20+
- azureml-widgets
21+
- pandas_ml
22+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: azure_automl
2+
dependencies:
3+
# The python interpreter version.
4+
# Currently Azure ML only supports 3.5.2 and later.
5+
- python>=3.5.2,<3.6.8
6+
- nb_conda
7+
- matplotlib==2.1.0
8+
- numpy>=1.15.3
9+
- cython
10+
- urllib3<1.24
11+
- scipy>=1.0.0,<=1.1.0
12+
- scikit-learn>=0.18.0,<=0.19.1
13+
- pandas>=0.22.0,<0.23.0
14+
- tensorflow>=1.12.0
15+
- py-xgboost<=0.80
16+
17+
- pip:
18+
# Required packages for AzureML execution, history, and data preparation.
19+
- azureml-sdk[automl,explain]
20+
- azureml-widgets
21+
- pandas_ml
22+
23+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
@echo off
2+
set conda_env_name=%1
3+
set automl_env_file=%2
4+
set options=%3
5+
set PIP_NO_WARN_SCRIPT_LOCATION=0
6+
7+
IF "%conda_env_name%"=="" SET conda_env_name="azure_automl"
8+
IF "%automl_env_file%"=="" SET automl_env_file="automl_env.yml"
9+
10+
IF NOT EXIST %automl_env_file% GOTO YmlMissing
11+
12+
call conda activate %conda_env_name% 2>nul:
13+
14+
if not errorlevel 1 (
15+
echo Upgrading azureml-sdk[automl,notebooks,explain] in existing conda environment %conda_env_name%
16+
call pip install --upgrade azureml-sdk[automl,notebooks,explain]
17+
if errorlevel 1 goto ErrorExit
18+
) else (
19+
call conda env create -f %automl_env_file% -n %conda_env_name%
20+
)
21+
22+
call conda activate %conda_env_name% 2>nul:
23+
if errorlevel 1 goto ErrorExit
24+
25+
call python -m ipykernel install --user --name %conda_env_name% --display-name "Python (%conda_env_name%)"
26+
27+
REM azureml.widgets is now installed as part of the pip install under the conda env.
28+
REM Removing the old user install so that the notebooks will use the latest widget.
29+
call jupyter nbextension uninstall --user --py azureml.widgets
30+
31+
echo.
32+
echo.
33+
echo ***************************************
34+
echo * AutoML setup completed successfully *
35+
echo ***************************************
36+
IF NOT "%options%"=="nolaunch" (
37+
echo.
38+
echo Starting jupyter notebook - please run the configuration notebook
39+
echo.
40+
jupyter notebook --log-level=50 --notebook-dir='..\..'
41+
)
42+
43+
goto End
44+
45+
:YmlMissing
46+
echo File %automl_env_file% not found.
47+
48+
:ErrorExit
49+
echo Install failed
50+
51+
:End
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
CONDA_ENV_NAME=$1
4+
AUTOML_ENV_FILE=$2
5+
OPTIONS=$3
6+
PIP_NO_WARN_SCRIPT_LOCATION=0
7+
8+
if [ "$CONDA_ENV_NAME" == "" ]
9+
then
10+
CONDA_ENV_NAME="azure_automl"
11+
fi
12+
13+
if [ "$AUTOML_ENV_FILE" == "" ]
14+
then
15+
AUTOML_ENV_FILE="automl_env.yml"
16+
fi
17+
18+
if [ ! -f $AUTOML_ENV_FILE ]; then
19+
echo "File $AUTOML_ENV_FILE not found"
20+
exit 1
21+
fi
22+
23+
if source activate $CONDA_ENV_NAME 2> /dev/null
24+
then
25+
echo "Upgrading azureml-sdk[automl,notebooks,explain] in existing conda environment" $CONDA_ENV_NAME
26+
pip install --upgrade azureml-sdk[automl,notebooks,explain] &&
27+
jupyter nbextension uninstall --user --py azureml.widgets
28+
else
29+
conda env create -f $AUTOML_ENV_FILE -n $CONDA_ENV_NAME &&
30+
source activate $CONDA_ENV_NAME &&
31+
python -m ipykernel install --user --name $CONDA_ENV_NAME --display-name "Python ($CONDA_ENV_NAME)" &&
32+
jupyter nbextension uninstall --user --py azureml.widgets &&
33+
echo "" &&
34+
echo "" &&
35+
echo "***************************************" &&
36+
echo "* AutoML setup completed successfully *" &&
37+
echo "***************************************" &&
38+
if [ "$OPTIONS" != "nolaunch" ]
39+
then
40+
echo "" &&
41+
echo "Starting jupyter notebook - please run the configuration notebook" &&
42+
echo "" &&
43+
jupyter notebook --log-level=50 --notebook-dir '../..'
44+
fi
45+
fi
46+
47+
if [ $? -gt 0 ]
48+
then
49+
echo "Installation failed"
50+
fi
51+
52+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
3+
CONDA_ENV_NAME=$1
4+
AUTOML_ENV_FILE=$2
5+
OPTIONS=$3
6+
PIP_NO_WARN_SCRIPT_LOCATION=0
7+
8+
if [ "$CONDA_ENV_NAME" == "" ]
9+
then
10+
CONDA_ENV_NAME="azure_automl"
11+
fi
12+
13+
if [ "$AUTOML_ENV_FILE" == "" ]
14+
then
15+
AUTOML_ENV_FILE="automl_env_mac.yml"
16+
fi
17+
18+
if [ ! -f $AUTOML_ENV_FILE ]; then
19+
echo "File $AUTOML_ENV_FILE not found"
20+
exit 1
21+
fi
22+
23+
if source activate $CONDA_ENV_NAME 2> /dev/null
24+
then
25+
echo "Upgrading azureml-sdk[automl,notebooks,explain] in existing conda environment" $CONDA_ENV_NAME
26+
pip install --upgrade azureml-sdk[automl,notebooks,explain] &&
27+
jupyter nbextension uninstall --user --py azureml.widgets
28+
else
29+
conda env create -f $AUTOML_ENV_FILE -n $CONDA_ENV_NAME &&
30+
source activate $CONDA_ENV_NAME &&
31+
conda install lightgbm -c conda-forge -y &&
32+
python -m ipykernel install --user --name $CONDA_ENV_NAME --display-name "Python ($CONDA_ENV_NAME)" &&
33+
jupyter nbextension uninstall --user --py azureml.widgets &&
34+
pip install numpy==1.15.3 &&
35+
echo "" &&
36+
echo "" &&
37+
echo "***************************************" &&
38+
echo "* AutoML setup completed successfully *" &&
39+
echo "***************************************" &&
40+
if [ "$OPTIONS" != "nolaunch" ]
41+
then
42+
echo "" &&
43+
echo "Starting jupyter notebook - please run the configuration notebook" &&
44+
echo "" &&
45+
jupyter notebook --log-level=50 --notebook-dir '../..'
46+
fi
47+
fi
48+
49+
if [ $? -gt 0 ]
50+
then
51+
echo "Installation failed"
52+
fi
53+
54+
55+

0 commit comments

Comments
 (0)