From dfbab6ac216215ee4c61a95d844a1c775dd3b5d1 Mon Sep 17 00:00:00 2001 From: "SATO Naoki (Neo)" Date: Wed, 10 Feb 2021 17:38:11 +0900 Subject: [PATCH 1/4] development_setup.md update development_setup.md updated to use install_requirements.sh. See #158: > Use conda rather than pip packages when possible (as recommended in AML docs). > Dev environment is hence also constrained to conda (no more pip install -r requirements.txt). --- docs/development_setup.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/development_setup.md b/docs/development_setup.md index 68e6b6bf..d684628f 100644 --- a/docs/development_setup.md +++ b/docs/development_setup.md @@ -10,19 +10,20 @@ In order to configure the project locally, create a copy of `.env.example` in th [Install the Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli). The Azure CLI will be used to log you in interactively. -Create a virtual environment using [venv](https://docs.python.org/3/library/venv.html), [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) or [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv). +Install [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html). -Here is an example for setting up and activating a `venv` environment with Python 3: +Install the required Python modules. ``` -python3 -mvenv .venv -source .venv/bin/activate +. environment_setup/install_requirements.sh ``` -Install the required Python modules in your virtual environment. +`install_requirements.sh` create and activate a new conda environment with required Python modules. ``` -pip install -r environment_setup/requirements.txt +conda env create -f diabetes_regression/ci_dependencies.yml + +conda activate mlopspython_ci ``` ### Running local code From 1433e39827bcaa32af36ad36add58cf05326e051 Mon Sep 17 00:00:00 2001 From: "SATO Naoki (Neo)" Date: Mon, 15 Feb 2021 15:47:26 +0900 Subject: [PATCH 2/4] Content of install_requirements.sh deleted --- docs/development_setup.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/development_setup.md b/docs/development_setup.md index d684628f..167853fd 100644 --- a/docs/development_setup.md +++ b/docs/development_setup.md @@ -12,20 +12,12 @@ In order to configure the project locally, create a copy of `.env.example` in th Install [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html). -Install the required Python modules. +Install the required Python modules. [`install_requirements.sh`](https://github.com/microsoft/MLOpsPython/blob/master/environment_setup/install_requirements.sh) creates and activates a new conda environment with required Python modules. ``` . environment_setup/install_requirements.sh ``` -`install_requirements.sh` create and activate a new conda environment with required Python modules. - -``` -conda env create -f diabetes_regression/ci_dependencies.yml - -conda activate mlopspython_ci -``` - ### Running local code To run your local ML pipeline code on Azure ML, run a command such as the following (in bash, all on one line): From b6324512583b64dbb0819168a5f332c4abb57704 Mon Sep 17 00:00:00 2001 From: "SATO Naoki (Neo)" Date: Tue, 16 Feb 2021 11:06:22 +0900 Subject: [PATCH 3/4] build_train_pipeline.py filename fixed --- docs/development_setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development_setup.md b/docs/development_setup.md index 167853fd..a59ddb64 100644 --- a/docs/development_setup.md +++ b/docs/development_setup.md @@ -23,7 +23,7 @@ Install the required Python modules. [`install_requirements.sh`](https://github. To run your local ML pipeline code on Azure ML, run a command such as the following (in bash, all on one line): ``` -export BUILD_BUILDID=$(uuidgen); python ml_service/pipelines/build_train_pipeline.py && python ml_service/pipelines/run_train_pipeline.py +export BUILD_BUILDID=$(uuidgen); python ml_service/pipelines/diabetes_regression_build_train_pipeline.py && python ml_service/pipelines/run_train_pipeline.py ``` BUILD_BUILDID is a variable used to uniquely identify the ML pipeline between the From bdca7438e86101388d9cef5c5a99b80165ce8ad7 Mon Sep 17 00:00:00 2001 From: "SATO Naoki (Neo)" Date: Tue, 16 Feb 2021 11:07:26 +0900 Subject: [PATCH 4/4] build_train_pipeline.py filename fixed --- docs/development_setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development_setup.md b/docs/development_setup.md index a59ddb64..1c8c2479 100644 --- a/docs/development_setup.md +++ b/docs/development_setup.md @@ -27,7 +27,7 @@ export BUILD_BUILDID=$(uuidgen); python ml_service/pipelines/diabetes_regression ``` BUILD_BUILDID is a variable used to uniquely identify the ML pipeline between the -`build_train_pipeline.py` and `run_train_pipeline.py` scripts. In Azure DevOps it is +`diabetes_regression_build_train_pipeline.py` and `run_train_pipeline.py` scripts. In Azure DevOps it is set to the current build number. In a local environment, we can use a command such as `uuidgen` so set a different random identifier on each run, ensuring there are no collisions.