Reader small image

You're reading from  The Machine Learning Solutions Architect Handbook - Second Edition

Product typeBook
Published inApr 2024
PublisherPackt
ISBN-139781805122500
Edition2nd Edition
Right arrow
Author (1)
David Ping
David Ping
author image
David Ping

David Ping is an accomplished author and industry expert with over 28 years of experience in the field of data science and technology. He currently serves as the leader of a team of highly skilled data scientists and AI/ML solutions architects at AWS. In this role, he assists organizations worldwide in designing and implementing impactful AI/ML solutions to drive business success. David's extensive expertise spans a range of technical domains, including data science, ML solution and platform design, data management, AI risk, and AI governance. Prior to joining AWS, David held positions in renowned organizations such as JPMorgan, Credit Suisse, and Intel Corporation, where he contributed to the advancements of science and technology through engineering and leadership roles. With his wealth of experience and diverse skill set, David brings a unique perspective and invaluable insights to the field of AI/ML.
Read more about David Ping

Right arrow

Building ML Solutions with AWS AI Services

Up to this point, we have mainly focused on the skills and technologies required to build and deploy ML models using open-source technologies and managed ML platforms. To solve business problems with ML, however, you don’t always have to build, train, and deploy your ML models from scratch. An alternative option is to use fully managed AI services. AI services are fully managed APIs or applications with pre-trained models that perform specific ML tasks, such as object detection or sentiment analysis. Some AI services also allow you to train custom models with your data for a defined ML task, such as document classification. AI services promise to enable organizations to build ML-enabled solutions without requiring strong ML competencies.

In this chapter, we are going to switch gears and talk about several AWS AI services and where they can be used in business applications. Please note that the focus of this chapter will not be...

Technical requirements

You will continue to use our AWS environment for the hands-on portion of this book. The associated code samples can be found at https://github.com/PacktPublishing/The-Machine-Learning-Solutions-Architect-and-Risk-Management-Handbook-Second-Edition/tree/main/Chapter11

What are AI services?

AI services are pre-built fully managed services that perform a particular set of ML tasks out of the box, such as facial analysis or text analysis. The primary target users for AI services are application developers who want to build AI applications without the need to build ML models from scratch. In contrast, the target audiences for ML platforms are data scientists and ML engineers, who need to go through the full ML lifecycle to build and deploy ML models.

For an organization, AI services mainly solve the following key challenges:

  • Lack of high-quality training data for ML model development: To train high-quality models, you need a large amount of high-quality curated data. For many organizations, data poses many challenges in data sourcing, data engineering, and data labeling.
  • Lack of data science skills for building and deploying custom ML models: Data science and ML engineering skills are scarce in the market and expensive to acquire...

Overview of AWS AI services

AWS provides AI services in multiple ML domains, such as text and vision, as well as AI services for industrial use cases such as manufacturing anomaly detection and predictive maintenance. In this section, we will cover a subset of AWS AI services. The objective of this section will not be to deep dive into individual services but rather to make you aware of the fundamental capabilities offered by these AI services. This will let you know where and how these services can be integrated into your applications.

Amazon Comprehend

NLP has gained significant interest across different industries in solving a range of business problems, such as automatic document processing, text summarization, document understanding, and document management and retrieval. Amazon Comprehend is an AI service that can perform NLP analysis on unstructured text documents. At its core, Amazon Comprehend provides the following main capabilities:

  • Entity recognition...

Building intelligent solutions with AI services

AI services can be used for building different intelligent solutions. To determine if you can use an AI service for your use case, you must identify the business and ML requirements and then evaluate if an AI service offers the functional and non-functional capabilities you are looking for. In this section, we will present several business use cases and architecture patterns that incorporate AI services.

Automating loan document verification and data extraction

When we apply for a loan from a bank, we need to provide the bank with physical copies of documentation such as tax returns, pay stubs, bank statements, and photo ID. Upon receiving those documents, the bank needs to verify them and enter the information from the documents into loan application systems for further processing. At the time of writing, many banks still perform this verification and data extraction process manually, which is time-consuming and error-prone...

Designing an MLOps architecture for AI services

Implementing custom AI service models requires a data engineering, model training, and model deployment pipeline. This process is similar to the process of building, training, and deploying models using an ML platform. As such, we can also adopt MLOps practice for AI services when running them at scale.

Fundamentally, MLOps for AI services intends to deliver similar benefits as MLOps for the ML platform, including process consistency, tooling reusability, reproducibility, delivery scalability, and auditability. Architecturally, we can implement a similar MLOps pattern for AI services.

AWS account setup strategy for AI services and MLOps

To isolate the different environments, we can adopt a multi-account strategy for configuring the MLOps environment for AI services. The following diagram illustrates a design pattern for a multi-account AWS environment. Depending on your organizational requirements for separation of duties...

Hands-on lab – running ML tasks using AI services

In this hands-on lab, you will perform a list of ML tasks using Rekognition, Comprehend, Textract, Personalize and Transcribe. After the lab, you will have developed hands-on experience with the core features of several AI services and how they can be used for various ML tasks. Follow these steps to get started:

  1. Launch the SageMaker Studio profile you created in Chapter 8, Building a Data Science Environment Using AWS ML Services. You will create and run new notebooks in this profile.
  2. We need to provide the new notebooks with permission to access AI services. To do this, find the Studio execution role for the Studio environment and attach the AdministratorAccess IAM policy to it. We will use this policy for simplicity here. In a controlled environment, you would need to design a policy to provide the specific permissions needed to access different services.
  3. Clone https://github.com/PacktPublishing/The...
lock icon
The rest of the chapter is locked
You have been reading a chapter from
The Machine Learning Solutions Architect Handbook - Second Edition
Published in: Apr 2024Publisher: PacktISBN-13: 9781805122500
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
David Ping

David Ping is an accomplished author and industry expert with over 28 years of experience in the field of data science and technology. He currently serves as the leader of a team of highly skilled data scientists and AI/ML solutions architects at AWS. In this role, he assists organizations worldwide in designing and implementing impactful AI/ML solutions to drive business success. David's extensive expertise spans a range of technical domains, including data science, ML solution and platform design, data management, AI risk, and AI governance. Prior to joining AWS, David held positions in renowned organizations such as JPMorgan, Credit Suisse, and Intel Corporation, where he contributed to the advancements of science and technology through engineering and leadership roles. With his wealth of experience and diverse skill set, David brings a unique perspective and invaluable insights to the field of AI/ML.
Read more about David Ping