In this directory, notebooks are provided to demonstrate how to tune and optimize hyperparameters of recommender algorithms with the utility functions (recommenders) provided in the repository.
Notebook | Description |
---|---|
tuning_spark_als | Step by step tutorials on how to fine tune hyperparameters for Spark based recommender model (illustrated by Spark ALS) with Spark native construct and hyperopt package. |
azureml_hyperdrive_wide_and_deep | Quickstart tutorial on utilizing Azure Machine Learning service for hyperparameter tuning of wide-and-deep model. |
azureml_hyperdrive_surprise_svd | Quickstart tutorial on utilizing Azure Machine Learning service for hyperparameter tuning of the matrix factorization method SVD from Surprise library. |
nni_surprise_svd | Quickstart tutorial on utilizing the Neural Network Intelligence toolkit for hyperparameter tuning of the matrix factorization method SVD from Surprise library. |
nni_ncf | Quickstart tutorial on utilizing the Neural Network Intelligence toolkit as a tool to tune the NCF model and SVD model and compare their performance against one another |
To run the examples running on the Azure Machine Learning service, the azureml-sdk
is required. The AzureML Python SDK is already installed after setting up the conda environments from this repository (see SETUP.md).
More info about setting up an AzureML environment can be found at this link.
AzureML workspace is the foundational block in the cloud that you use to experiment, train, and deploy machine learning models. We
- set up a workspace from Azure portal and
- create a config file manually.
The instructions here are based on AzureML documents about Quickstart with Azure portal and Quickstart with Python SDK where you can find more details with screenshots about the setup process.
- Sign in to the Azure portal by using the credentials for the Azure subscription you use.
- Select Create a resource menu, search for Machine Learning service workspace select Create button.
- In the ML service workspace pane, configure your workspace by entering the workspace name and resource group (or create new resource group if you don't have one already), and select Create. It can take a few moments to create the workspace.
To configure this notebook to communicate with your workspace, type in your Azure subscription id, the resource group name and workspace name to , , in the cell below. Alternatively, you can create a ./aml_config/config.json file with the following contents:
{
"subscription_id": "<subscription-id>",
"resource_group": "<resource-group>",
"workspace_name": "<workspace-name>"
}
The NNI command nnictl
comes installed with the conda environment.
In order to use the SMAC tuner, it has to be installed first with the following command
nnictl package install --name=SMAC
.