The Machine Learning Solutions Architect Handbook

Book description

Build highly secure and scalable machine learning platforms to support the fast-paced adoption of machine learning solutions

Key Features

  • Explore different ML tools and frameworks to solve large-scale machine learning challenges in the cloud
  • Build an efficient data science environment for data exploration, model building, and model training
  • Learn how to implement bias detection, privacy, and explainability in ML model development

Book Description

When equipped with a highly scalable machine learning (ML) platform, organizations can quickly scale the delivery of ML products for faster business value realization. There is a huge demand for skilled ML solutions architects in different industries, and this handbook will help you master the design patterns, architectural considerations, and the latest technology insights you’ll need to become one.

You’ll start by understanding ML fundamentals and how ML can be applied to solve real-world business problems. Once you've explored a few leading problem-solving ML algorithms, this book will help you tackle data management and get the most out of ML libraries such as TensorFlow and PyTorch.

Using open source technology such as Kubernetes/Kubeflow to build a data science environment and ML pipelines will be covered next, before moving on to building an enterprise ML architecture using Amazon Web Services (AWS). You’ll also learn about security and governance considerations, advanced ML engineering techniques, and how to apply bias detection, explainability, and privacy in ML model development.

By the end of this book, you’ll be able to design and build an ML platform to support common use cases and architecture patterns like a true professional.

What you will learn

  • Apply ML methodologies to solve business problems
  • Design a practical enterprise ML platform architecture
  • Implement MLOps for ML workflow automation
  • Build an end-to-end data management architecture using AWS
  • Train large-scale ML models and optimize model inference latency
  • Create a business application using an AI service and a custom ML model
  • Use AWS services to detect data and model bias and explain models

Who this book is for

This book is for data scientists, data engineers, cloud architects, and machine learning enthusiasts who want to become machine learning solutions architects. You’ll need basic knowledge of the Python programming language, AWS, linear algebra, probability, and networking concepts before you get started with this handbook.

Table of contents

  1. The Machine Learning Solutions Architect Handbook
  2. Contributors
  3. About the author
  4. About the reviewers
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Get in touch
    8. Share Your Thoughts
  6. Section 1: Solving Business Challenges with Machine Learning Solution Architecture
  7. Chapter 1: Machine Learning and Machine Learning Solutions Architecture
    1. What are AI and ML?
      1. Supervised ML
      2. Unsupervised ML
      3. Reinforcement learning
    2. ML versus traditional software
    3. ML life cycle
      1. Business understanding and ML problem framing
      2. Data understanding and data preparation
      3. Model training and evaluation
      4. Model deployment
      5. Model monitoring
      6. Business metric tracking
    4. ML challenges
    5. ML solutions architecture
      1. Business understanding and ML transformation
      2. Identification and verification of ML techniques
      3. System architecture design and implementation
      4. ML platform workflow automation
      5. Security and compliance
    6. Testing your knowledge
    7. Summary
  8. Chapter 2: Business Use Cases for Machine Learning
    1. ML use cases in financial services
      1. Capital markets front office
      2. Capital markets back office operations
      3. Risk management and fraud
      4. Insurance
    2. ML use cases in media and entertainment
      1. Content development and production
      2. Content management and discovery
      3. Content distribution and customer engagement
    3. ML use cases in healthcare and life sciences
      1. Medical imaging analysis
      2. Drug discovery
      3. Healthcare data management
    4. ML use cases in manufacturing
      1. Engineering and product design
      2. Manufacturing operations – product quality and yield
      3. Manufacturing operations – machine maintenance
    5. ML use cases in retail
      1. Product search and discovery
      2. Target marketing
      3. Sentiment analysis
      4. Product demand forecasting
    6. ML use case identification exercise
    7. Summary
  9. Section 2: The Science, Tools, and Infrastructure Platform for Machine Learning
  10. Chapter 3: Machine Learning Algorithms
    1. Technical requirements
    2. How machines learn
    3. Overview of ML algorithms
      1. Consideration for choosing ML algorithms
      2. Algorithms for classification and regression problems
      3. Algorithms for time series analysis
      4. Algorithms for recommendation
      5. Algorithms for computer vision problems
      6. Algorithms for natural language processing problems
      7. Generative model
    4. Hands-on exercise
      1. Problem statement
      2. Dataset description
      3. Setting up a Jupyter Notebook environment
      4. Running the exercise
    5. Summary
  11. Chapter 4: Data Management for Machine Learning
    1. Technical requirements
    2. Data management considerations for ML
    3. Data management architecture for ML
      1. Data storage and management
      2. Data ingestion
      3. Data cataloging
      4. Data processing
      5. Data versioning
      6. ML feature store
      7. Data serving for client consumption
      8. Authentication and authorization
      9. Data governance
    4. Hands-on exercise – data management for ML
      1. Creating a data lake using Lake Formation
      2. Creating a data ingestion pipeline
      3. Creating a Glue catalog
      4. Discovering and querying data in the data lake
      5. Creating an Amazon Glue ETL job to process data for ML
      6. Building a data pipeline using Glue workflows
    5. Summary
  12. Chapter 5: Open Source Machine Learning Libraries
    1. Technical requirements
    2. Core features of open source machine learning libraries
    3. Understanding the scikit-learn machine learning library
      1. Installing scikit-learn
      2. Core components of scikit-learn
    4. Understanding the Apache Spark ML machine learning library
      1. Installing Spark ML
      2. Core components of the Spark ML library
    5. Understanding the TensorFlow deep learning library
      1. Installing Tensorflow
      2. Core components of TensorFlow
    6. Hands-on exercise – training a TensorFlow model
    7. Understanding the PyTorch deep learning library
      1. Installing PyTorch
      2. Core components of PyTorch
    8. Hands-on exercise – building and training a PyTorch model
    9. Summary
  13. Chapter 6: Kubernetes Container Orchestration Infrastructure Management
    1. Technical requirements
    2. Introduction to containers
    3. Kubernetes overview and core concepts
    4. Networking on Kubernetes
      1. Service mesh
    5. Security and access management
      1. Network security
      2. Authentication and authorization to APIs
      3. Running ML workloads on Kubernetes
    6. Hands-on – creating a Kubernetes infrastructure on AWS
      1. Problem statement
      2. Lab instruction
    7. Summary
  14. Section 3: Technical Architecture Design and Regulatory Considerations for Enterprise ML Platforms
  15. Chapter 7: Open Source Machine Learning Platforms
    1. Technical requirements
    2. Core components of an ML platform
    3. Open source technologies for building ML platforms
      1. Using Kubeflow for data science environments
      2. Building a model training environment
      3. Registering models with a model registry
      4. Serving models using model serving services
      5. Automating ML pipeline workflows
    4. Hands-on exercise – building a data science architecture using open source technologies
      1. Part 1 – Installing Kubeflow
      2. Part 2 – tracking experiments and models, and deploying models
      3. Part 3 – Automating with an ML pipeline
    5. Summary
  16. Chapter 8: Building a Data Science Environment Using AWS ML Services
    1. Technical requirements
    2. Data science environment architecture using SageMaker
      1. SageMaker Studio
      2. SageMaker Processing
      3. SageMaker Training Service
      4. SageMaker Tuning
      5. SageMaker Experiments
      6. SageMaker Hosting
    3. Hands-on exercise – building a data science environment using AWS services
      1. Problem statement
      2. Dataset
      3. Lab instructions
    4. Summary
  17. Chapter 9: Building an Enterprise ML Architecture with AWS ML Services
    1. Technical requirements
    2. Key requirements for an enterprise ML platform
    3. Enterprise ML architecture pattern overview
    4. Model training environment
      1. Model training engine
      2. Automation support
      3. Model training life cycle management
    5. Model hosting environment deep dive
      1. Inference engine
      2. Authentication and security control
      3. Monitoring and logging
    6. Adopting MLOps for ML workflows
      1. Components of the MLOps architecture
      2. Monitoring and logging
    7. Hands-on exercise – building an MLOps pipeline on AWS
      1. Creating a CloudFormation template for the ML training pipeline
      2. Creating a CloudFormation template for the ML deployment pipeline
    8. Summary
  18. Chapter 10: Advanced ML Engineering
    1. Technical requirements
    2. Training large-scale models with distributed training
      1. Distributed model training using data parallelism
      2. Distributed model training using model parallelism
    3. Achieving low latency model inference
      1. How model inference works and opportunities for optimization
      2. Hardware acceleration
      3. Model optimization
      4. Graph and operator optimization
      5. Model compilers
      6. Inference engine optimization
    4. Hands-on lab – running distributed model training with PyTorch
      1. Modifying the training script
      2. Modifying and running the launcher notebook
    5. Summary
  19. Chapter 11: ML Governance, Bias, Explainability, and Privacy
    1. Technical requirements
    2. What is ML governance and why is it needed?
      1. The regulatory landscape around model risk management
      2. Common causes of ML model risks
    3. Understanding the ML governance framework
    4. Understanding ML bias and explainability
      1. Bias detection and mitigation
      2. ML explainability techniques
    5. Designing an ML platform for governance
      1. Data and model documentation
      2. Model inventory
      3. Model monitoring
      4. Change management control
      5. Lineage and reproducibility
      6. Observability and auditing
      7. Security and privacy-preserving ML
    6. Hands-on lab – detecting bias, model explainability, and training privacy-preserving models
      1. Overview of the scenario
      2. Detecting bias in the training dataset
      3. Explaining feature importance for the trained model
      4. Training privacy-preserving models
  20. Chapter 12: Building ML Solutions with AWS AI Services
    1. Technical requirements
    2. What are AI services?
    3. Overview of AWS AI services
      1. Amazon Comprehend
      2. Amazon Textract
      3. Amazon Rekognition
      4. Amazon Transcribe
      5. Amazon Personalize
      6. Amazon Lex
      7. Amazon Kendra
      8. Evaluating AWS AI services for ML use cases
    4. Building intelligent solutions with AI services
      1. Automating loan document verification and data extraction
      2. Media processing and analysis workflow
      3. E-commerce product recommendation
      4. Customer self-service automation with intelligent search
    5. Designing an MLOps architecture for AI services
      1. AWS account setup strategy for AI services and MLOps
      2. Code promotion across environments
      3. Monitoring operational metrics for AI services
    6. Hands-on lab – running ML tasks using AI services
    7. Summary
    8. Why subscribe?
  21. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts

Product information

  • Title: The Machine Learning Solutions Architect Handbook
  • Author(s): David Ping
  • Release date: January 2022
  • Publisher(s): Packt Publishing
  • ISBN: 9781801072168