ML Overview

Azure Machine Learning is a cloud service for accelerating and managing the machine learning (ML) project lifecycle. ML professionals, data scientists, and engineers can use it in their day-to-day workflows to train and deploy models and manage machine learning operations (MLOps).

You can create a model in Machine Learning or use a model built from an open-source platform, such as PyTorch, TensorFlow, or scikit-learn.

MLOps tools help you monitor, retrain, and redeploy models.

Cross-compatible platform tools that meet your needs

ML Studio

Machine Learning studio offers multiple authoring experiences depending on the type of project and the level of your past ML experience, without having to install anything.

  • Notebooks: Write and run your own code in managed Jupyter Notebook servers that are directly integrated in the studio.
  • Visualize run metrics: Analyze and optimize your experiments with visualization.
  • Azure Machine Learning designer: Use the designer to train and deploy ML models without writing any code. Drag and drop datasets and components to create ML pipelines.
  • Automated machine learning UI: Learn how to create automated ML experiments with an easy-to-use interface.
  • Data labeling: Use Machine Learning data labeling to efficiently coordinate image labeling or text labeling projects.

Visualize run metrics:

Machine learning project workflow

Typically, models are developed as part of a project with an objective and goals. Projects often involve more than one person. When you experiment with data, algorithms, and models, development is iterative.

Project lifecycle

The project lifecycle can vary by project, but it often looks like this diagram.

Train models

In Azure Machine Learning, you can run your training script in the cloud or build a model from scratch. Customers often bring models they’ve built and trained in open-source frameworks so that they can operationalize them in the cloud.

Open and interoperable

Data scientists can use models in Azure Machine Learning that they’ve created in common Python frameworks, such as:

  • PyTorch
  • TensorFlow
  • scikit-learn
  • XGBoost
  • LightGBM

Other languages and frameworks are also supported:

  • R
  • .NET

Automated featurization and algorithm selection

In a repetitive, time-consuming process, in classical ML, data scientists use prior experience and intuition to select the right data featurization and algorithm for training. Automated ML (AutoML) speeds this process. You can use it through the Machine Learning studio UI or the Python SDK.

Hyperparameter optimization

Hyperparameter optimization, or hyperparameter tuning, can be a tedious task. Machine Learning can automate this task for arbitrary parameterized commands with little modification to your job definition. Results are visualized in the studio.

Multinode distributed training

Efficiency of training for deep learning and sometimes classical machine learning training jobs can be drastically improved via multinode distributed training. Azure Machine Learning compute clusters and serverless compute offer the latest GPU options.

Supported via Azure Machine Learning Kubernetes, Azure Machine Learning compute clusters, and serverless compute:

  • PyTorch
  • TensorFlow
  • MPI

You can use MPI distribution for Horovod or custom multinode logic. Apache Spark is supported via serverless Spark compute and attached Synapse Spark pool that use Azure Synapse Analytics Spark clusters.

Embarrassingly parallel training

Scaling an ML project might require scaling embarrassingly parallel model training. This pattern is common for scenarios like forecasting demand, where a model might be trained for many stores.

Deploy models

To bring a model into production, you deploy the model. The Azure Machine Learning managed endpoints abstract the required infrastructure for both batch or real-time (online) model scoring (inferencing).

Real-time and batch scoring (inferencing)

Batch scoring, or batch inferencing, involves invoking an endpoint with a reference to data. The batch endpoint runs jobs asynchronously to process data in parallel on compute clusters and store the data for further analysis.

Real-time scoring, or online inferencing, involves invoking an endpoint with one or more model deployments and receiving a response in near real time via HTTPS. Traffic can be split across multiple deployments, allowing for testing new model versions by diverting some amount of traffic initially and increasing after confidence in the new model is established.

For more information, see:

MLOps: DevOps for machine learning

DevOps for ML models, often called MLOps, is a process for developing models for production. A model’s lifecycle from training to deployment must be auditable if not reproducible.

ML model lifecycle

Integrations enabling MLOPs

Machine Learning is built with the model lifecycle in mind. You can audit the model lifecycle down to a specific commit and environment.

Some key features enabling MLOps include:

  • git integration.
  • MLflow integration.
  • Machine learning pipeline scheduling.
  • Azure Event Grid integration for custom triggers.
  • Ease of use with CI/CD tools like GitHub Actions or Azure DevOps.

What is Azure Machine Learning CLI and Python SDK v2?

Azure Machine Learning CLI v2 (CLI v2) and Azure Machine Learning Python SDK v2 (SDK v2) introduce a consistency of features and terminology across the interfaces. To create this consistency, the syntax of commands differs, in some cases significantly, from the first versions (v1).

There are no differences in functionality between CLI v2 and SDK v2. The command line-based CLI might be more convenient in CI/CD MLOps types of scenarios, while the SDK might be more convenient for development

Azure Machine Learning CLI v2

Azure Machine Learning CLI v2 is the latest extension for the Azure CLI. CLI v2 provides commands in the format az ml <noun> <verb> <options> to create and maintain Machine Learning assets and workflows. The assets or workflows themselves are defined by using a YAML file. The YAML file defines the configuration of the asset or workflow. For example, what is it, and where should it run?

A few examples of CLI v2 commands:

  • az ml job create --file my_job_definition.yaml
  • az ml environment update --name my-env --file my_updated_env_definition.yaml
  • az ml model list
  • az ml compute show --name my_compute

Use cases for CLI v2

CLI v2 is useful in the following scenarios:

  • Onboard to Machine Learning without the need to learn a specific programming language.

The YAML file defines the configuration of the asset or workflow, such as what is it and where should it run? Any custom logic or IP used, say data preparation, model training, and model scoring, can remain in script files. These files are referred to in the YAML but aren’t part of the YAML itself. Machine Learning supports script files in Python, R, Java, Julia, or C#. All you need to learn is YAML format and command lines to use Machine Learning. You can stick with script files of your choice.

  • Take advantage of ease of deployment and automation.

The use of command line for execution makes deployment and automation simpler because you can invoke workflows from any offering or platform, which allows users to call the command line.

  • Use managed inference deployments.

Machine Learning offers endpoints to streamline model deployments for both real-time and batch inference deployments. This functionality is available only via CLI v2 and SDK v2.

  • Reuse components in pipelines.

Machine Learning introduces components for managing and reusing common logic across pipelines. This functionality is available only via CLI v2 and SDK v2.

Azure Machine Learning Python SDK v2

Azure Machine Learning Python SDK v2 is an updated Python SDK package, which allows users to:

  • Submit training jobs.
  • Manage data, models, and environments.
  • Perform managed inferencing (real time and batch).
  • Stitch together multiple tasks and production workflows by using Machine Learning pipelines.

SDK v2 is on par with CLI v2 functionality and is consistent in how assets (nouns) and actions (verbs) are used between SDK and CLI. For example, to list an asset, you can use the list action in both SDK and CLI. You can use the same list action to list a compute, model, environment, and so on.

Use cases for SDK v2

SDK v2 is useful in the following scenarios:

  • Use Python functions to build a single step or a complex workflow.

SDK v2 allows you to build a single command or a chain of commands like Python functions. The command has a name and parameters, expects input, and returns output.

  • Move from simple to complex concepts incrementally.

SDK v2 allows you to:

  • Construct a single command.
    • Add a hyperparameter sweep on top of that command.
    • Add the command with various others into a pipeline one after the other.

This construction is useful because of the iterative nature of machine learning.

  • Reuse components in pipelines.

Machine Learning introduces components for managing and reusing common logic across pipelines. This functionality is available only via CLI v2 and SDK v2.

  • Use managed inferencing.

Machine Learning offers endpoints to streamline model deployments for both real-time and batch inference deployments. This functionality is available only via CLI v2 and SDK v2.

Should I use v1 or v2?

Support for CLI v1 will end on September 30, 2025.

We encourage you to migrate your code for both CLI and SDK v1 to CLI and SDK v2. For more information, see Upgrade to v2.

ML Use case:

Machine learning operations (MLOps) v2 – Azure Architecture Center | Microsoft Learn

Azure architecture have end-to-end continuous integration (CI), continuous delivery (CD), and retraining pipelines. The architectures are for these AI applications:

  • Classical machine learning
  • Computer vision (CV)
  • Natural language processing (NLP)

Potential use cases

  • Classical machine learning: Time-Series forecasting, regression, and classification on tabular structured data are the most common use cases in this category. Examples are:
    • Binary and multi-label classification
    • Linear, polynomial, ridge, lasso, quantile, and Bayesian regression
    • ARIMA, autoregressive (AR), SARIMA, VAR, SES, LSTM
  • CV: The MLOps framework presented here focuses mostly on the CV use cases of segmentation and image classification.
  • NLP: This MLOps framework can implement any of those use cases, and others not listed:
    • Named entity recognition
    • Text classification
    • Text generation
    • Sentiment analysis
    • Translation
    • Question answering
    • Summarization
    • Sentence detection
    • Language detection
    • Part-of-speech tagging

Simulations, deep reinforcement learning, and other forms of AI aren’t covered by this article.

Examples of ML Models

Image Classification using DenseNet

Binary Classification using Vowpal Wabbit Model

Wide & Deep based  Recommendations

Regression – Automobile Price Predication

Linear regression to predict taxi fares in NYC.

Banking:

In the banking domain, generative AI (genAI) and machine learning (ML) are transforming the way financial services operate. Here are a few use cases where these technologies are making a significant impact:

1. Personalized Banking Experiences: GenAI can analyze customer data to provide personalized financial advice, product recommendations, and investment strategies tailored to individual needs.

2. Fraud Detection and Prevention: ML algorithms can detect patterns indicative of fraudulent activity, allowing banks to respond quickly to potential threats.

3. Credit Scoring and Risk Assessment: ML models can assess credit risk more accurately by considering a wider range of factors than traditional methods.

4. Regulatory Compliance: GenAI can help banks navigate complex regulatory landscapes by automating the analysis of legal documents and compliance reports.

5. Customer Service Automation: Chatbots and virtual assistants powered by genAI can handle customer inquiries, providing quick and efficient service.

6. Process Automation: GenAI can automate routine tasks such as data entry, report generation, and transaction processing, increasing efficiency and reducing errors.

7. Predictive Analytics: ML can forecast financial trends and market movements, aiding in strategic decision-making for investments and risk management. 

Insurance:            

In the insurance domain, generative AI (genAI) and machine learning (ML) are revolutionizing various aspects of the industry. Here are some impactful use cases:

Streamlined Claims Processing:

Intelligent automation powered by ML and genAI significantly improves claims processing efficiency.

Traditional claims management processes, often paper-based and manual, can consume up to 50%-80% of premiums’ revenues.

ML models enhance claims routing, triage, and detection of fraudulent claims.

Underwriting and Risk Assessment:

ML algorithms analyze vast amounts of data to assess risk accurately.

Predictive analytics help insurers make informed decisions during underwriting.

By incorporating data from various sources (e.g., IoT devices, telematics), insurers can enhance risk evaluation and pricing.

Personalized Insurance Pricing:

GenAI enables insurers to tailor pricing based on individual risk profiles.

By considering factors like driving behavior, health metrics, and lifestyle, insurers can offer personalized premiums.

Fraud Detection and Prevention:

ML models identify patterns indicative of fraudulent activity.

Real-time monitoring helps prevent fraudulent claims and reduces losses for insurers.

Customer Service Automation:

Chatbots and virtual assistants powered by genAI handle customer inquiries, provide quick responses, and enhance user experience.

These AI-driven solutions operate 24/7, improving customer satisfaction.

Predictive Analytics for Customer Retention:

ML algorithms analyze customer behavior, preferences, and historical data.

Insurers can proactively engage with policyholders, offer personalized recommendations, and reduce churn.

Health:

Generative AI (genAI) and machine learning (ML) are increasingly integral to the healthcare domain, offering innovative solutions for improving patient care and operational efficiency. Here are a few use cases:

Clinical Decision Support:

ML algorithms assist clinicians in diagnosing and treating patients by analyzing medical data and suggesting potential diagnoses and treatment plans.

Predictive Analytics:

ML models predict patient outcomes, readmission risks, and potential complications, enabling proactive care and better resource allocation.

Personalized Medicine:

GenAI tailors treatment plans to individual genetic profiles, improving the efficacy of therapies and reducing side effects.

Medical Imaging Analysis:

ML enhances the accuracy of interpreting medical images, such as X-rays and MRIs, leading to earlier and more accurate diagnoses.

Drug Discovery and Development:

ML accelerates the drug discovery process by predicting molecular behavior and identifying promising compounds for further research.

Virtual Health Assistants:

GenAI-powered chatbots provide 24/7 patient support, answering questions, reminding about medications, and monitoring health conditions.

Operational Efficiency:

ML optimizes hospital workflows, predicts patient admission rates, and manages inventory, leading to cost savings and improved patient care.

Conclusion

Azure Machine Learning is a cloud-based service designed to accelerate and manage the machine learning project lifecycle. It caters to ML professionals, data scientists, and engineers, facilitating their workflows in model training, deployment, and machine learning operations (MLOps).

Key Features:

Productivity: Offers tools for collaboration, model development, deployment, and management, enhancing productivity across the team.

Enterprise-Readiness: Provides security and role-based access control within the Microsoft Azure cloud environment.

Integration: Supports integration with Azure services for comprehensive solutions.

Cross-Compatibility: Allows the use of preferred tools like Azure Machine Learning studio, Python SDK, Azure CLI, and REST APIs for various tasks.

Who Benefits:

Data Scientists/ML Engineers: For accelerating and automating workflows.

Application Developers: For integrating models into applications or services.

Platform Developers: For building advanced ML tooling with robust Azure Resource Manager APIs.

Conclusion: 

Azure Machine Learning stands out as a pivotal tool in the realm of cloud services, streamlining the machine learning project lifecycle. Its robust features cater to a diverse range of professionals, from data scientists to platform developers, ensuring productivity, security, and seamless integration with other Azure services.

The platform’s cross-compatibility with popular tools and languages empowers teams to collaborate effectively and deploy models at scale. As machine learning continues to evolve, Azure Machine Learning provides a reliable and efficient environment for innovation and operational excellence, making it an essential asset for any organization looking to leverage the power of AI.

References:

What is Azure Machine Learning? – Azure Machine Learning | Microsoft Learn

Azure Machine Learning CLI & SDK v2 – Azure Machine Learning | Microsoft Learn

Leave a Reply

Discover more from Rajeev Singh | Coder, Blogger, YouTuber

Subscribe now to keep reading and get access to the full archive.

Continue reading