#CognitiveServices – #AnomalyDetector Service running on Containers (some #docker time!)

Buy Me A Coffee


I was chatting about the new features and the use cases supported using the brand new (and still in Preview) Cognitive Services Anomaly Detector and I realized that we can use the service with local containers (instead of the cloud service), but there is something different in this Service.

anomaly detector sample data chart

Why to use containers?

Azure Cognitive Services allow developers to easily add cognitive features—such as object detection, vision recognition, and language understanding—into their applications without having direct AI or data science skills or knowledge. Containerization is an approach to software distribution in which an application or service is packaged so that it can be deployed in a container host with little or no modification

I first will recommend reading the article [Getting started with Azure Cognitive Services in containers] and then I will remark 2 main advantages of using containers

  • You can get a better control of your internet usage. I mean, all the HTTP calls will be performed in your intranet
  • You will have a better data governance.

Related to the 2nd bullet, I’ll quote the official launch sample

For example, let’s look at a typical hospital system that works with patients. After many years of taking care of patients, they have numerous doctor’s notes, intake records, or other files that they want to process and derive insights about key trends. Using Cognitive Services containers, they can process all of these files, index millions of documents and find commonalities, and improve the patient experience while keeping the data in-house. Another example would be a large manufacturing plant that has limited connectivity where they want to track assets on the edge using remote sensors and cameras, using AI to predict maintenance needs.

As a downside point, you need to manage your own docker instances, which may require some extra work. However, it’s likely that you are already doing this, so this is “just more containers”

How about Anomaly Detector Containers?

And, after this small introduction, and starting to use Anomaly Detector Service I found that if you want to use Anomaly Detector with containers, you must first complete and submit the Anomaly Detector Container Request form to request access to the container.

Anomaly Detector Container Request form


The form requests information about you, your company, and the user scenario for which you’ll use the container. After you’ve submitted the form, the Azure Cognitive Services team reviews it to ensure that you meet the criteria for access to the private container registry.

Once you submitted your request and been approved, you can start to use the Anomaly Detector service locally with containers. And just a reminder about this: even if your data requests are not going to hit and Azure HTPP Endpoint, your containers need to be able to connect to Azure.

The container needs the billing argument values to run. These values allow the container to connect to the billing endpoint. The container reports usage about every 10 to 15 minutes. If the container doesn’t connect to Azure within the allowed time window, the container continues to run but doesn’t serve queries until the billing endpoint is restored. The connection is attempted 10 times at the same time interval of 10 to 15 minutes. If it can’t connect to the billing endpoint within the 10 tries, the container stops running.

Happy Coding!

Greetings @ Toronto

El Bruno



Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: