AI workloads and considerations:
Features of common AI workloads
Feature |
Capabilities |
Automated Machine Learning |
enables non-experts to quickly create effective ML model from data |
Azure ML Designer |
graphical interface enabling no-code developments of ML solutions |
Data and compute management |
cloud-based data storage and compute resources that professional DS can run data experiment code at scale |
Pipelines |
DS, software engineers, etc can define pipelines to orchestrate model training, deploy, manage tasks |
-
Features of anomaly detection
- identify fraud or failure
- use Anomaly Detector:
- embed time series data of all types
- select best algorithm
- deploy where you need (cloud or ioT edge)
-
Computer Vision workloads:
-
image classification, object detection, semantic segmentation (different cars of different colors → Semantic segmentation provides the ability to classify individual pixels in an image depending on the object that they represent), image analysis (tags, summarize scenes), optical character recognition (OCR - text in images)
-
use Computer Vision:
- analyze images and video, extract description, tags, objects.
-
use Custom Vision:
- train custom image classification and object detection using own images.
-
use Face:
- build face detection and face recognition.
-
use Form Recognizer:
- extract info from scanned forms and invoices (’fatura’)
-
NLP workloads
-
analyse and interpret text in documents, emails, etc.
-
interpret spoken language
-
auto translate spoken or written phrases between languages
-
interpret commands and determine appropriate actions
-
use Language:
- access features for understanding and analyzing text, trainning language models that can understand spoken or text-based commands
-
use Translator:
- translate text between more than 60 languages
-
use Speech:
- use this service to recognize and synthesize speech, and to translate to spoken languages. Any speech to text or text to speech translations.
-
use Azure Bot:
- use bot framework to create a bot and manage with Azure Bot Service - integrating back end services like language, connect to channels from web, mail, teams, etc.
-
Knowledge mining workloads
- extract info from large volumes of unstructured data to create a searchable knowledge store
- use Azure Cognitive Search:
- search solutions that has tools for building indexes
- can use built-in AI capabilities of Azure Cognitive Services such as image processing, content extraction, NLP processing to perform mining documents
- makes it possible to index previously unsearchable documents and to extract insights from large amounts of data
- Cognitive Search can index JSON documents. JSON is also used to define index schemas, indexers, and data source objects.
- An indexer converts documents into JSON and forwards them to a search engine for indexing.
- f you set up a search index without including a skillset, you would still be able to query text content. Cognitive Search is used for full text search over indexes containing alphanumeric content.
Guiding principles for responsible AI
- Fairness
- interpret model and quantify the extent to which a feature influences prediction
- all groups and races and genders involved
- Fairness involves evaluating and mitigating the bias introduced by the features of a model
- Reliability and safety
- not create harm in the world
- rigorous testing and management
- operate as they were originally designed for
- resist harmful manipulation
- Privacy and safety
- secure and respect privacy
- data contain personal details that must be kept private
- security on the new data after deploy
- control over collection, use and storage of data
- Inclusiveness
- empower people
- bring benefits to all parts of society
- Transparency
- AI should be understandable
- users should be fully aware of purpose and conditions of the system
- Transparency provides clarity regarding the purpose of AI solutions, the way they work, as well as their limitations.
- Accountability
- people should be accountable
- developers should work under governance frameworks and ethical standarts
Fundamental principles of ML on Azure
Common ML types
- Regression
- continuous value (price, sales)
- evaluation metric: r2 and RMSE
- multiple linear regression: features are independent of each other
- Classification
- determine class label, binary
- classify text as positive/negative
- Cluster
- labels by grouping similar info
- to deploy: select module named ‘assign new data to cluster’
Azure ML Studio
To start modelling, you need to create an experiment.
Compute:
- instances: dev workstation
- clusters: scalable virtual machines
- inference clusters: deployment targets for predictive services that use trained models
- attached compute: VM on databricks clusters
- use Automated ML
- you can include python scripts;
- automatically tries multiple pre-processing techniques and model trainning algorithms in parallel;
- no DS programming knowledge needed;
- jobs: specify training script, compute target and Azure ML envirionment.
- for other to use: deploy the model to a web service
Steps:
Inference pipeline (AKS - Kubernetes):
- inference in real time;
- to access web service: authetication key (primary) and REST endpoint
- use Azure ML Designer
- First step: create a pipeline ind ML designer
- canvas with drag and drop interface;
- each designer product is a pipeline you make on canvas
- Assets:
- pipelines: lets you reuse complex ML flows across projects
- components: encapsulates a task for tracking your ML experiment
- jobs: executes a task for tracking your ML experiment
Steps:
- create workspace
- create compute
- create pipeline
- create dataset
- load data to canvas
- apply transformations (clena missing, normalize, etc)
- run pipeline and verify data
- add train modules and split data
- run pipeline
- score and evaluate
- create inference pipeline
- deploy as a service
Features: characteristics of the entity for which you want to make a prediction;
Labels: is the quantity you want to train a model to predict (predicted values);
Features of computer vision workloads
Common types of computer vision solutions
Image classification → analyse an imagr and generate human readable phrase that can describe the image. The description can be used to suggest tags (building, tower).
Object detection → return bounding box coordinates (multilabel and multiclass) and tags (class label and probability). Can be used to detect brands, human faces, domain specific contents.
OCR → detect printed and handwritten text in images.