To run either locally or on Azure DevOps, this set of scripts need a few environment variables to be set.
This document lists and describes each one of them.
The Databricks instance name.
The Databricks Personal Access Token you have generated on your workspace.
Optional. A suffix you can use to identify all of your clusters.
If you choose not to set one, all of your clusters will be called aml-cluster.
Use this variable if you prefer to use an existing cluster to run your
train pipeline. Here, you can set the chosen cluster id. Check
this doc
for more information about cluster ids.
The name of your Azure Machine Learning Service Workspace. Amongst all the
generated infrastructure resources, this will have the -AML-WS suffix.
The name of the Azure Resource Group that contains all of your workloads
(Databricks Workspace, Azure ML Service, etc.). Amongst all the
generated infrastructure resources, this will have the -AML-RG suffix.
The ID of the Azure Subscription that is being used to run this infrastructure.
The ID of the Azure Active Directory Tenant associated with the Azure Subscription
The Application ID of the Service Principal you have created to run this code.
The Application Secret (or password) of the Service Principal you have created to run this code.
The root folder of this code.
For example: if you have cloned this repository on /home/username/projects
and you have not customized the name of the repository local folder, the
SOURCES_DIR would be /home/username/projects/MLOpsDatabricks.
If you're associating this repo with an Azure DevOps pipeline without
much customization to clone the repo, this variable can set as
$(Build.SourcesDirectory).
If you use this code structure as is, the current train script path
is src/train/train.py.
The name that was given to your Azure Databricks Workspace. Amongst all the
generated infrastructure resources, this will have the -AML-ADB suffix.
The name you want to give to the compute target that will be associated with the Azure ML Service Workspace. This will attach the Databricks Cluster to the Azure ML Service Workspace.
The directory to save the trained model to, on the Databricks Cluster.
It's recommended to use /dbfs/model.
The name to give to the trained model. For example: my-trained-model.