Compare commits
8 Commits
release_up
...
release_up
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8dad09a42f | ||
|
|
db2bf8ae93 | ||
|
|
820c09734f | ||
|
|
a2a33c70a6 | ||
|
|
2ff791968a | ||
|
|
7186127804 | ||
|
|
28be7bcf58 | ||
|
|
37a9350fde |
@@ -155,7 +155,7 @@ jupyter notebook
|
||||
- Continuous retraining using Pipelines and Time-Series TabularDataset
|
||||
|
||||
- [auto-ml-classification-text-dnn.ipynb](classification-text-dnn/auto-ml-classification-text-dnn.ipynb)
|
||||
- Classification with text data using deep learning in AutoML
|
||||
- Classification with text data using deep learning in automated ML
|
||||
- AutoML highlights here include using deep neural networks (DNNs) to create embedded features from text data.
|
||||
- Depending on the compute cluster the user provides, AutoML tried out Bidirectional Encoder Representations from Transformers (BERT) when a GPU compute is used.
|
||||
- Bidirectional Long-Short Term neural network (BiLSTM) when a CPU compute is used, thereby optimizing the choice of DNN for the uesr's setup.
|
||||
|
||||
@@ -272,7 +272,9 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"This step requires an Enterprise workspace to gain access to this feature. To learn more about creating an Enterprise workspace or upgrading to an Enterprise workspace from the Azure portal, please visit our [Workspace page](https://docs.microsoft.com/azure/machine-learning/service/concept-workspace#upgrade)."
|
||||
"This step requires an Enterprise workspace to gain access to this feature. To learn more about creating an Enterprise workspace or upgrading to an Enterprise workspace from the Azure portal, please visit our [Workspace page](https://docs.microsoft.com/azure/machine-learning/service/concept-workspace#upgrade).\n",
|
||||
"\n",
|
||||
"This notebook uses the blocked_models parameter to exclude some models that can take a longer time to train on some text datasets. You can choose to remove models from the blocked_models list but you may need to increase the experiment_timeout_hours parameter value to get results."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -299,6 +301,7 @@
|
||||
" compute_target=compute_target,\n",
|
||||
" training_data=train_dataset,\n",
|
||||
" label_column_name=target_column_name,\n",
|
||||
" blocked_models = ['LightGBM'],\n",
|
||||
" **automl_settings\n",
|
||||
" )"
|
||||
]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import pandas as pd
|
||||
from azureml.core import Environment
|
||||
from azureml.core.conda_dependencies import CondaDependencies
|
||||
from azureml.train.estimator import Estimator
|
||||
from azureml.core.run import Run
|
||||
|
||||
@@ -8,13 +7,7 @@ from azureml.core.run import Run
|
||||
def run_inference(test_experiment, compute_target, script_folder, train_run,
|
||||
train_dataset, test_dataset, target_column_name, model_name):
|
||||
|
||||
train_run.download_file('outputs/conda_env_v_1_0_0.yml',
|
||||
'inference/condafile.yml')
|
||||
|
||||
inference_env = Environment("myenv")
|
||||
inference_env.docker.enabled = True
|
||||
inference_env.python.conda_dependencies = CondaDependencies(
|
||||
conda_dependencies_file_path='inference/condafile.yml')
|
||||
inference_env = train_run.get_environment()
|
||||
|
||||
est = Estimator(source_directory=script_folder,
|
||||
entry_script='infer.py',
|
||||
|
||||
56
how-to-use-azureml/azure-databricks/automl/README.md
Normal file
56
how-to-use-azureml/azure-databricks/automl/README.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# Adding an init script to an Azure Databricks cluster
|
||||
|
||||
The [azureml-cluster-init.sh](./azureml-cluster-init.sh) script configures the environment to
|
||||
1. Install the latest AutoML library
|
||||
|
||||
To create the Azure Databricks cluster-scoped init script
|
||||
|
||||
1. Create the base directory you want to store the init script in if it does not exist.
|
||||
```
|
||||
dbutils.fs.mkdirs("dbfs:/databricks/init/")
|
||||
```
|
||||
|
||||
2. Create the script azureml-cluster-init.sh
|
||||
```
|
||||
dbutils.fs.put("/databricks/init/azureml-cluster-init.sh","""
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
/databricks/python/bin/pip install -r https://aka.ms/automl_linux_requirements.txt
|
||||
""", True)
|
||||
```
|
||||
|
||||
3. Check that the script exists.
|
||||
```
|
||||
display(dbutils.fs.ls("dbfs:/databricks/init/azureml-cluster-init.sh"))
|
||||
```
|
||||
|
||||
1. Configure the cluster to run the script.
|
||||
* Using the cluster configuration page
|
||||
1. On the cluster configuration page, click the Advanced Options toggle.
|
||||
1. At the bottom of the page, click the Init Scripts tab.
|
||||
1. In the Destination drop-down, select a destination type. Example: 'DBFS'
|
||||
1. Specify a path to the init script.
|
||||
```
|
||||
dbfs:/databricks/init/azureml-cluster-init.sh
|
||||
```
|
||||
1. Click Add
|
||||
|
||||
* Using the API.
|
||||
```
|
||||
curl -n -X POST -H 'Content-Type: application/json' -d '{
|
||||
"cluster_id": "<cluster_id>",
|
||||
"num_workers": <num_workers>,
|
||||
"spark_version": "<spark_version>",
|
||||
"node_type_id": "<node_type_id>",
|
||||
"cluster_log_conf": {
|
||||
"dbfs" : {
|
||||
"destination": "dbfs:/cluster-logs"
|
||||
}
|
||||
},
|
||||
"init_scripts": [ {
|
||||
"dbfs": {
|
||||
"destination": "dbfs:/databricks/init/azureml-cluster-init.sh"
|
||||
}
|
||||
} ]
|
||||
}' https://<databricks-instance>/api/2.0/clusters/edit
|
||||
```
|
||||
@@ -13,12 +13,13 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We support installing AML SDK as library from GUI. When attaching a library follow this https://docs.databricks.com/user-guide/libraries.html and add the below string as your PyPi package. You can select the option to attach the library to all clusters or just one cluster.\n",
|
||||
"## AutoML Installation\n",
|
||||
"\n",
|
||||
"**install azureml-sdk with Automated ML**\n",
|
||||
"* Source: Upload Python Egg or PyPi\n",
|
||||
"* PyPi Name: `azureml-sdk[automl]`\n",
|
||||
"* Select Install Library"
|
||||
"**For Databricks non ML runtime 7.1(scala 2.21, spark 3.0.0) and up, Install AML sdk by running the following command in the first cell of the notebook.**\n",
|
||||
"\n",
|
||||
"%pip install -r https://aka.ms/automl_linux_requirements.txt\n",
|
||||
"\n",
|
||||
"**For Databricks non ML runtime 7.0 and lower, Install AML sdk using init script as shown in [readme](readme.md) before running this notebook.**\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -13,12 +13,13 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We support installing AML SDK as library from GUI. When attaching a library follow this https://docs.databricks.com/user-guide/libraries.html and add the below string as your PyPi package. You can select the option to attach the library to all clusters or just one cluster.\n",
|
||||
"## AutoML Installation\n",
|
||||
"\n",
|
||||
"**install azureml-sdk with Automated ML**\n",
|
||||
"* Source: Upload Python Egg or PyPi\n",
|
||||
"* PyPi Name: `azureml-sdk[automl]`\n",
|
||||
"* Select Install Library"
|
||||
"**For Databricks non ML runtime 7.1(scala 2.21, spark 3.0.0) and up, Install AML sdk by running the following command in the first cell of the notebook.**\n",
|
||||
"\n",
|
||||
"%pip install -r https://aka.ms/automl_linux_requirements.txt\n",
|
||||
"\n",
|
||||
"**For Databricks non ML runtime 7.0 and lower, Install AML sdk using init script as shown in [readme](readme.md) before running this notebook.**"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user