Skip to content

Commit 08bb6f4

Browse files
authored
Simplify docs flow (#297)
1 parent cd762ec commit 08bb6f4

File tree

3 files changed

+21
-24
lines changed

3 files changed

+21
-24
lines changed

bootstrap/README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
11
# Bootstrap from MLOpsPython repository
22

3-
To use this existing project structure and scripts for your new ML project, you can quickly get started from the existing repository, bootstrap and create a template that works for your ML project.
4-
5-
Bootstrapping will prepare a directory structure for your project which includes:
6-
7-
* renaming files and folders from the base project name `diabetes_regression` to your project name
8-
* fixing imports and absolute path based on your project name
9-
* deleting and cleaning up some directories
10-
11-
To bootstrap from the existing MLOpsPython repository:
12-
13-
1. Ensure Python 3 is installed locally
14-
1. Clone this repository locally
15-
1. Run bootstrap.py script
16-
`python bootstrap.py -d [dirpath] -n [projectname]`
17-
* `[dirpath]` is the absolute path to the root of the directory where MLOpsPython is cloned
18-
* `[projectname]` is the name of your ML project
3+
For steps on how to use the bootstrap script, please see the "Bootstrap the project" section of the [custom model guide](../docs/custom_model.md#bootstrap-the-project).

docs/custom_model.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
This document provides steps to follow when using this repository as a template to train models and deploy the models with real-time inference in Azure ML with your own scripts and data.
44

55
1. Follow the MLOpsPython [Getting Started](getting_started.md) guide
6-
1. Follow the MLOpsPython [bootstrap instructions](../bootstrap/README.md) to create your project starting point
6+
1. Bootstrap the project
77
1. Configure training data
88
1. [If necessary] Convert your ML experimental code into production ready code
99
1. Replace the training code
10-
1. Update the evaluation code
10+
1. [Optional] Update the evaluation code
1111
1. Customize the build agent environment
1212
1. [If appropriate] Replace the score code
1313

@@ -17,24 +17,36 @@ Follow the [Getting Started](getting_started.md) guide to set up the infrastruct
1717

1818
Take a look at the [Repo Details](code_description.md) document for a description of the structure of this repository.
1919

20-
## Follow the Bootstrap instructions
20+
## Bootstrap the project
2121

22-
The [Bootstrap from MLOpsPython repository](../bootstrap/README.md) guide will help you to quickly prepare the repository for your project.
22+
Bootstrapping will prepare the directory structure to be used for your project name which includes:
23+
24+
* renaming files and folders from the base project name `diabetes_regression` to your project name
25+
* fixing imports and absolute path based on your project name
26+
* deleting and cleaning up some directories
2327

2428
**Note:** Since the bootstrap script will rename the `diabetes_regression` folder to the project name of your choice, we'll refer to your project as `[project name]` when paths are involved.
2529

30+
To bootstrap from the existing MLOpsPython repository:
31+
32+
1. Ensure Python 3 is installed locally
33+
1. From a local copy of the code, run the `bootstrap.py` script in the `bootstrap` folder
34+
`python bootstrap.py -d [dirpath] -n [projectname]`
35+
* `[dirpath]` is the absolute path to the root of the directory where MLOpsPython is cloned
36+
* `[projectname]` is the name of your ML project
37+
2638
## Configure training data
2739

2840
The training ML pipeline uses a [sample diabetes dataset](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_diabetes.html) as training data.
2941

30-
To use your own data:
42+
**Important** Convert the template to use your own Azure ML Dataset for model training via these steps:
3143

3244
1. [Create a Dataset](https://docs.microsoft.com/azure/machine-learning/how-to-create-register-datasets) in your Azure ML workspace
3345
1. Update the `DATASET_NAME` and `DATASTORE_NAME` variables in `.pipelines/[project name]-variables-template.yml`
3446

3547
## Convert your ML experimental code into production ready code
3648

37-
The MLOpsPython template creates an Azure Machine Learning (ML) pipeline that invokes a set of [Azure ML pipeline steps](https://docs.microsoft.com/python/api/azureml-pipeline-steps/azureml.pipeline.steps) (see `ml_service/pipelines/[project name]_build_train_pipeline.py`). If your experiment is currently in a Jupyter notebook, it will need to be refactored into scripts that can be run independantly and dropped into the template which the existing Azure ML pipeline steps utilize.
49+
The MLOpsPython template creates an Azure Machine Learning (ML) pipeline that invokes a set of [Azure ML pipeline steps](https://docs.microsoft.com/python/api/azureml-pipeline-steps/azureml.pipeline.steps) (see `ml_service/pipelines/[project name]_build_train_pipeline.py`). If your experiment is currently in a Jupyter notebook, it will need to be refactored into scripts that can be run independently and dropped into the template which the existing Azure ML pipeline steps utilize.
3850

3951
1. Refactor your experiment code into scripts
4052
1. [Recommended] Prepare unit tests

docs/getting_started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
# Getting Started with MLOpsPython <!-- omit in toc -->
33

4-
This guide shows how to get MLOpsPython working with a sample ML project ***diabetes_regression***. The project creates a linear regression model to predict diabetes. You can adapt this example to use with your own project.
4+
This guide shows how to get MLOpsPython working with a sample ML project ***diabetes_regression***. The project creates a linear regression model to predict diabetes and has CI/CD DevOps practices enabled for model training and serving when these steps are completed in this getting started guide.
55

6-
We recommend working through this guide completely to ensure everything is working in your environment. After the sample is working, follow the [bootstrap instructions](../bootstrap/README.md) to convert the ***diabetes_regression*** sample into a starting point for your project.
6+
If you would like to bring your own model code to use this template structure, follow the [custom model](custom_model.md) guide. We recommend completing this getting started guide with the diabetes model through ACI deployment first to ensure everything is working in your environment before converting the template to use your own model code.
77

88
- [Setting up Azure DevOps](#setting-up-azure-devops)
99
- [Install the Azure Machine Learning extension](#install-the-azure-machine-learning-extension)

0 commit comments

Comments
 (0)