Skip to main content
Version: 2022

AutoML Service

The Automated Machine Learning (AutoML) service is used by the Software Factory to train machine learning models in development environments. The same service is used in test- and production environments to perform predictions using the trained models.

When this service is not configured, these features cannot be used.

Prerequisites

Docker

The AutoML service is distributed as a Linux Docker container, therefore the Docker service needs to be up and running before setting up the AutoML service. Currently the supported target platforms for the AutoML service are Linux, Windows 10 and Windows server 2019.

Linux

Because the steps to install docker depend on the Linux distribution used, you should follow the installation guide on https://docs.docker.com/engine/install/ or the official documentation for your distribution of choice.

Windows 10

To use Docker on Windows 10 you will need to download and install Docker Desktop for Windows. The download link + detailed installation instructions can be found here. As is mentioned in the installation instructions it is important to check your Windows 10 version (should be a 64 bit Pro or Enterprise version with minimum build version 15063) and whether the Hyper-V and Containers Windows feature are enabled.

After installation, which will require a reboot, Docker Desktop should start automatically. The default setting is to use Linux containers, but be sure to check this by right-clicking on the Docker Desktop system tray icon. There should be an option to switch to Windows containers. When you see an option to switch to Linux containers, this means that Docker is set to run Windows containers and you will need to switch it back to Linux containers.

note

Running Windows and Linux containers side by side is currently still an experimental feature.

Windows Server 2019

Installation guidelines for Windows Server 2019 are pending.

Installing the image

When docker is setup correctly the AutoML container can be installed in a few steps:

Step 1: Open a shell. On Windows Powershell can be used, but make sure that you run it as Administrator since Docker requires elevated privileges. On Linux any shell can be used, but the docker commands will only work when you either run them as root or as a user that has been added to the docker group.

Step 2: Install the container. You will fist need to login to the Azure Container Registry first with the following command:.

docker login --username TSFAutoMLPull --password MKlWmYvvkzwX7k6gH=vSef+pmyf538mE thinkwise.azurecr.io

Afterwards the Docker container can be pulled using the following command:

docker pull thinkwise.azurecr.io/tsfautoml_linux

The first time the image is pulled it will need to download several GB of data. Every subsequent pull will only download the differences between the local image and the one that is pulled from the repository.

Step 3: Test the container. To test the container you can use the following command:

docker run -p 8080:8080 thinkwise.azurecr.io/tsfautoml_linux

The -p switch is used to map TCP port 8080 that is used by the RESTful service in the container to a TCP port on the host machine. When port 8080 is already in use, it is possible to use a different TCP port. For instance when you want to use port 8888 you should change the above command to:

docker run -p 8888:8080 thinkwise.azurecr.io/tsfautoml_linux

When everything is fine, you should now see several lines of text indicating that the service is starting up and after a couple of seconds it should be ready for use.

Step 4: Daemonize the service. This step ensures the AutoML service will start automatically together with the Docker service. To do this you must first stop the current AutoML container. You can get a list of running containers by issuing the following command:

docker ps

To stop a running container you should use the docker stop command followed by the shown CONTAINER ID. For example:

docker stop 3e0edc0daf96

Now start the container again, but this time with two extra options as follows:

docker run -p 8080:8080 -d --restart unless-stopped thinkwise.azurecr.io/tsfautoml_linux

The -d switch tells the Docker service to run the container as a background process and the --restart unless-stopped provides it with a restart policy that will always restart the container as soon as the docker service starts but only when the container was not stopped manually by a user. You could also use --restart always, in that case the container is always started together with the Docker service.

Step 5: Ensure the Docker service is always started.

Linux

On Linux you can use systemd to start Docker on boot:

sudo systemctl enable docker

Windows 10

For Windows 10 users it must be noted that the Docker service is started automatically but only after login. When you would like to have the container started without the need to login you can circumvent that problem by adding Docker Desktop to the task scheduler and let it start without the need to login.

Windows Server 2019

Installation guidelines for Windows Server 2019 are pending.

Configuring Indicium

The appsettings.json file in the Indicium installation folder can be modified as follows to allow Indicium to communicate with the AutoML service:

{
"MetaSourceConnection": {
"Server": "[server]",
"Database": "[iam_database]",
},
"AutoML": {
"AutoMLServiceURL": "http://localhost:8080/"
}
}

Enabling the AutoML training schedule

Once the container and Indicium have been configured, the AutoML training schedule can be enabled. This is a scheduled process flow for the Software Factory.

Verify that the schedule is enabled in the Intelligent Application Manager:

  1. Login to IAM as an administrator.
  2. Navigate in the IAM menu to the group Authorization and open Applications.
  3. Select the Software Factory. This is the application with project ID SQLSERVER_SF.
  4. Navigate to the detail Scheduled system flows.
  5. Turn off the prefilter Active to view all schedulable system flows for the Software Factory.
  6. Select the process flow system_flow_automl_training.
  7. Ensure the schedule every_30_seconds is set to Active.

New AutoML models which are queued to train in the Software Factory will now start their training cycle within 30 seconds.

Was this page helpful?