#SageMaker #GlueDataBrew #RedshiftML #QuickSightQ
1. What is Machine Learning?
2. Typical Machine Learning Process
3. Amazon SageMaker Overview
4. New on Amazon SageMaker
(4.1) Amazon SageMaker Data Wrangler
(4.2) Amazon SageMaker Feature Store
(4.3) Amazon SageMaker Pipelines
(4.4) Availability & Pricing
5. Bringing ML To Even More Builders
(5.1) Amazon Redshift ML
(5.2) Amazon Neptune ML
(5.3) AWS Glue DataBrew
(5.4) Amazon QuickSight Q
6. Summary - Awesome AI/ML Services
7. AI/ML Mission @ AWS
참고
- Amazon Redshift ML Is Now Generally Available – Use SQL to Create Machine Learning Models and Make Predictions from Your Data https://aws.amazon.com/ko/blogs/aws/amazon-redshift-ml-is-now-generally-available-use-sql-to-create-machine-learning-models-and-make-predictions-from-your-data/
2. 1. What is Machine Learning?
2. Typical Machine Learning Process
3. New on Amazon SageMaker
4. Bringing ML To Even More Builders
5. AI/ML Mission @ AWS
Agenda
4. Option 1- Build A Rule Engine
Age Gender Purchase
Date
Items
30 M 3/1/2017 Toy
40 M 1/3/2017 Books
…. …… ….. …..
Input Output
Age Gender Purchase
Date
Items
30 M 3/1/2017 Toy
…. …… ….. …..
Rule 1: 15 <age< 30
Rule 2: Bought Toy=Y,
Last Purchase<30 days
Rule 3: Gender = ‘M’,
Bought Toy =‘Y’
Rule 4: ……..
Rule 5: ……..
Human
Programmer
5. Option 2 - Learn The Business Rules From Data
Learning
Algorithm
Model
Output
Historical Purchase Data
(Training Data)
Prediction
Age Gender Items
35 F
39 M Toy
Input - New Unseen Data
Age Gender Purchase
Date
Items
30 M 3/1/2017 Toy
40 M 1/3/2017 Books
…. …… ….. …..
6. We Call This Approach Machine Learning
Learning
Algorithm
Model
Output
Historical Purchase Data
(Training Data)
Prediction
Age Gender Items
35 F
39 M Toy
Input - New Unseen Data
Age Gender Purchase
Date
Items
30 M 3/1/2017 Toy
40 M 1/3/2017 Books
…. …… ….. …..
Rule 1: 15 <age< 30
Rule 2: Bought Toy=Y,
Last Purchase<30 days
Rule 3: Gender = ‘M’,
Bought Toy =‘Y’
Rule 4: ……..
Rule 5: ……..
Human
Programmer
7. Typical Machine Learning Process
Collect, prepare and
label training data
Choose and
optimize
ML algorithm
Train and
tune ML models
Set up and
manage
environments
for training
Deploy models
in production
Scale and manage
the production
environment
1
2
3
13. 기계 학습 모델 개발 및 배포를 위한 최초의 완전 통합 개발 환경 (IDE)
Amazon SageMaker Studio
코드 작성 없이
데이터를 가지고
자동 모델 생성
SageMaker
Autopilot
코드 의존성 추적
없이 확장 가능한
노트북 공유
SageMaker
Notebooks
수천 개의 모델
실험을 구성,
추적 및 비교
SageMaker
Experiments
오류 자동 디버깅 및
실시간 오류 경보
SageMaker
Debugger
모델 모니터링 및
고품질 유지
SageMaker
Model Monitor
14. Amazon SageMaker overview
PREPARE
SageMaker Ground Truth
Label training data for machine learning
SageMaker Data Wrangler NEW
Aggregate and prepare data for
machine learning
SageMaker Processing
Built-in Python, BYO R/Spark
SageMaker Feature Store NEW
Store, update, retrieve, and share features
SageMaker Clarify NEW
Detect bias and understand
model predictions
BUILD
SageMaker Studio Notebooks
Jupyter notebooks with elastic compute
and sharing
Built-in and Bring
your-own Algorithms
Dozens of optimized algorithms or bring
your own
Local Mode
Test and prototype on your local machine
SageMaker Autopilot
Automatically create machine learning
models with full visibility
SageMaker JumpStart NEW
Pre-built solutions for common use cases
TRAIN & TUNE
Managed Training
Distributed infrastructure
management
SageMaker Experiments
Capture, organize, and compare
every step
Automatic
Model Tuning
Hyperparameter optimization
Distributed Training NEW
Training for large datasets
and models
SageMaker Debugger NEW
Debug and profile training runs
Managed Spot Training
Reduce training cost by 90%
DEPLOY & MANAGE
Managed Deployment
Fully managed, ultra low latency,
high throughput
Kubernetes & Kubeflow
Integration
Simplify Kubernetes-based
machine learning
Multi-Model Endpoints
Reduce cost by hosting multiple models
per instance
SageMaker Model Monitor
Maintain accuracy of deployed models
SageMaker Edge Manager NEW
Manage and monitor models on
edge devices
SageMaker Pipelines NEW
Workflow orchestration and automation
Amazon SageMaker
SageMaker Studio
Integrated development environment (IDE) for ML
15. SageMaker
Data Wrangler
visual interface to
prepare data for ML
New on Amazon SageMaker
SageMaker
Pipelines
DevOps capabilities
ML projects
SageMaker
Feature Store
discover, store, and
share ML Features
17. Typical Machine Learning Process
Collect, prepare and
label training data
Choose and
optimize
ML algorithm
Train and
tune ML models
Set up and
manage
environments
for training
Deploy models
in production
Scale and manage
the production
environment
1
2
3
18. 머신 러닝을 위한
데이터를 준비하는 가장
빠르고 쉬운 방법
빠른 데이터 선택 및 쿼리
Built-in 데이터 변환을 사용하여 원본 데이터를 머신 러닝을 위한 기능으로
변환
Built-in 데이터 변환으로 데이터를 쉽게 변환
PySpark, SQL 또는 Pandas에서 사용자 지정 변환을 가져올 수 있는 완벽한
유연성
데이터 변환 사용자 지정
코드를 작성하지 않고도 이상값outliers 또는 극단값extreme values을 빠르게 감지
시각적으로 데이터 이해
ML 모델 정확성을 저해할 수 있는 데이터 준비 워크플로의 잠재적 문제 진단
ML 모델 정확도accuracy를 빠르게 추정
클릭 한 번으로 데이터 준비 워크플로를 프로덕션에 배포
단일 시각적 인터페이스를 통해 데이터 준비 워크플로의 모든 단계를
관리하여 워크 플로를 프로덕션 설정으로 빠르게 운영 가능
SageMaker
Data Wrangler
여러 소스들로 부터의 데이터 지원
19. 빠른 데이터 선택 및 쿼리
Amazon Athena, Amazon Redshift,
AWS Lake Formation, Amazon S3 및
SageMaker Feature Store의
피쳐feature에서 데이터를 선택할 수
있습니다.
SageMaker Data Wrangler로
데이터를 가져오기 전에 데이터
원본에 대한 쿼리를 작성할 수
있습니다.
CSV, Parquet 파일 및 DB 테이블과
같은 다양한 파일 형식의 데이터를
Amazon SageMaker로 직접 가져올
수 있습니다.
20. 손쉬운 데이터 변환
300 종류 이상의 빌트인 데이터 변환data
transformations을 사용하여 코드 프리code-free
데이터 변환이 가능합니다.
빌트인 데이터 변환에는 열 유형 변환, 열
이름 바꾸기 및 열 삭제가 포함됩니다.
PySpark, SQL 및 Pandas에서 사용자
지정 변환 작성이 가능합니다.
21. 시각적으로 데이터 이해
사전 구성pre-configured된 시각화 템플릿
세트를 사용하여 데이터를 직관적으로
이해할 수 있습니다.
사전 구성된 시각화 템플릿에는
히스토그램, 산점도, box 및 whisker 플롯,
선 플롯, 막대 차트가 포함됩니다.
자신만의 시각화를 대화식으로 생성하고
편집하여 이상값outlier이나
극단값extreme을 빠르게 감지할 수
있습니다.
22. Quick 모델 - 모델 정확도를 빠르게 추정
ML 모델이 프로덕션에 배포되기 전에
데이터 준비 워크플로의 불일치를
식별하고 문제를 진단합니다.
데이터의 하위 집합subset을 선택하여
오류를 식별합니다.
다른 피쳐와 비교하여 모델 성능에
기여하는 피쳐를 식별합니다.
모델 성능 향상을 위해 추가 피쳐
엔지니어링이 필요한지 결정합니다.
23. 데이터 준비 워크플로를 프로덕션에 배포
데이터 준비 워크플로workflow를
주피터 노트북 또는 Python 코드로
내보낼 수 있습니다.
워크플로를 SageMaker Pipelines와
통합하여 모델 배포 및 관리를
자동화합니다.
팀 및 프로젝트에서 재사용 및
신디케이션syndication을 위해 생성된
피쳐를 SageMaker Feature Store에
게시publish할 수 있습니다.
25. Machine Learning - Learn Rules From Data
Learning
Algorithm
Model
Output
Historical Purchase Data
(Training Data)
Prediction
Age Gender Items
35 F
39 M Toy
Input - New Unseen Data
Age Gender Purchase
Date
Items
30 M 3/1/2017 Toy
40 M 1/3/2017 Books
…. …… ….. …..
Rule 1: 15 <age< 30
Rule 2: Bought Toy=Y,
Last Purchase<30 days
Rule 3: Gender = ‘M’,
Bought Toy =‘Y’
Rule 4: ……..
Rule 5: ……..
Human
Programmer
Features
26. SageMaker
Feature Store
실시간 및 배치 추론을
위한 피쳐를 안전하게
저장, 검색 및 공유
피쳐 수집을 위한 높은 처리량 쓰기
일괄 및 스트리밍 수집Batch and streaming ingestion
실시간 예측을위한 온라인 피쳐. 모델 훈련 및 일괄 예측을 위한 과거historical 데이터의
오프라인 피쳐
온라인 및 오프라인 피쳐
피쳐 발견 검색
피쳐 발견 및 재사용
피쳐에 대한 메타 데이터를 저장하고 자동 데이터 카탈로그를 활용하여 피쳐
데이터를 쉽게 쿼리 및 추출
피쳐 메타 데이터 및 데이터 카탈로그
피쳐 데이터 및 피쳐 메타 데이터에 대한 액세스 제어, 미사용 암호화 지원, VPC 및
PrivateLink
보안 및 액세스 제어
완전 관리
지연 시간이 짧은 저장소에 캐시된 온라인 피쳐. 추론 왜곡을 방지하기 위해 온라인 및
오프라인 스토어 간의 일관성 유지
27. Amazon SageMaker Feature Store의 동작 방식
Streaming
Batch
Offline feature
store
처리되지 않은
원본 형식의
데이터
Raw Data
더 나은 모델을
위해 원본
데이터를 의미
있는 피쳐로 변환
Feature Processing
Amazon SageMaker
Feature Store
머신 러닝을 위한
피쳐 저장, 검색 및
공유
스트리밍 피쳐 또는
배치 피쳐를 중앙
저장소로 이동
Ingest Data
일관성과 정확성을
유지하는 온라인 및
오프라인 스토어
Store
실시간 및 배치
애플리케이션과 모델
훈련을 위한 피쳐
Serve
Online Feature
Store
Real time
inference
Batch
Inference
Model
Training
28. Streaming Ingestion
SageMaker Feature Store – Data Ingestion
H I G H T H R O U G H P U T C O S T O P T I M I Z E D D A T A I N G E S T T O F E A T U R E S T O R E
Batch Ingestion
• 스트리밍 수집ingestion을 위한 API
• 온라인 스토어 또는 온라인 및 오프라인
스토어 모두에 직접 데이터 수집
• 수집 시 검증
• 사용자 지정 SageMaker Spark 컨테이너
• 오프라인 스토어 또는 온라인 및 오프라인
스토어 모두에 직접 데이터 수집
• 수집 시 검증
Amazon SageMaker
Feature Store
Online Store
Offline Store
29. 피쳐 그룹Feature Groups을 통한 피쳐 관리
피쳐 그룹이라는 컬렉션에 피쳐를
저장합니다.
피쳐 그룹 메타데이터를 정의합니다.
온라인 또는 오프라인 저장소에 대한
피쳐 그룹을 설정합니다.
피쳐 그룹에 대한 데이터 카탈로그를
생성합니다.
RecordIndentifier 및 EventTime과
같은 필수 피쳐를 제공합니다.
피쳐 그룹 태그를 사용하여 포괄적인
메타 데이터를 관리합니다.
30. 피쳐 저장소를 사용한 피쳐 검색
모든 기존 피쳐 그룹의 목록을
찾아볼 수 있습니다.
피쳐 그룹 이름, 설명, 태그 및 기타
메타 데이터를 검색하여 관심 있는
피쳐를 쉽게 찾을 수 있습니다.
스키마를 이해하기 위해 피쳐 그룹의
세부 정보를 볼 수 있습니다.
32. Typical Machine Learning Process
Collect, prepare and
label training data
Choose and
optimize
ML algorithm
Train and
tune ML models
Set up and
manage
environments
for training
Deploy models
in production
Scale and manage
the production
environment
1
2
3
33. Challenges with creating a complete workflow for the ML lifecycle
1
2 컨셉concept에서 프로덕션까지 모델을 가져오는 데는 여러 단계가 포함
• ML 수명주기lifecycle의 각 단계에 대한 표준 코드 패키지 생성
• 워크플로라는 구조로 연결
• 단계step 간 종속성 관리
• 오케스트레이션 된 시퀀스로 워크플로 실행
모델 구축, 훈련 및 배포는 반복적인 프로세스
3 워크플로의 각 단계에 대한 아티팩트 추적
5 MLOps의 일부로 전체 워크플로 자동화 및 확장
4 수천 개의 모델에서 올바른 버전의 모델 배포 및 관리
34. Amazon
SageMaker
Pipelines
머신 러닝 개발 가속화
수백 개의 모델 아티팩트model artifacts를 자동으로 추적
프로덕션에서 수천 개의 ML 모델로 확장
규모에 맞게 완전 자동화된
머신 러닝 워크플로 구축
빌트인 템플릿에서 선택하여 CI/CD 파이프 라인을 설정하여
워크플로를 자동화하고 대규모 ML 모델을 배포합니다.
구조화된 감사 추적을 유지하기 위해 모델 아티팩트를 자동으로
추적하여 수동 프로세스를 제거합니다.
몇 번의 클릭만으로 완전히 자동화된 ML 워크플로를 생성하여 몇
개월의 코딩 시간을 몇 시간으로 단축할 수 있습니다.
35. Amazon SageMaker Pipelines
ML 워크플로 작성 및 관리
ML 수명주기lifecycle의 각 단계에 대한 코드, 데이터셋 및 버전 추적
거버넌스 및 감사audit를 위한 모델 계보lineage 추적
사용자 지정 일정에 따라 모든 단계를 다시 실행하여 모델을 최신 상태로
유지
워크플로 재생 및 재실행
SageMaker Studio의 시각적 인터페이스를 통해 모듈 배포 및 관리
모델을 시각적으로 비교, 선택 및 배포
CI/CD 사례를 사용하여 완전 자동화된 머신 러닝 워크플로 구축
CI/CD 지원이 내장된 완전 관리형 MLOps
훈련된 모델의 중앙 레지스트리에 액세스
모델 레지스트리를 사용하여 프로덕션 배포에 가장 적합한 모델 선택
Key Features
사용하기 쉬운 Python SDK로 상세한 워크플로를 만들고 시각적으로
관리
36. CI/CD 파이프라인 예시 (1)
2. Git Commit & Push 3. Automatic Pipelining
1. 코드 수정 & Git Add
37. CI/CD 파이프라인 예시 (2)
2. 모델 버전 간 metric 비교
1.
3.
4. 프로덕션 배포 승인 여부
UI로 쉽게 모델 버전 간 성능을 비교할 수 있으며, status 변경으로 원클릭 배포 가능
38. Availability & Pricing
서비스 비용 설명
SageMaker Data Wrangler 인스턴스 사용량에 따라 과금
SageMaker Feature Store
쓰기, 읽기, 스토리지 당 과금
과금은 아래 3가지 경우에 대해
발생
1 / 데이터 수집의 일부로 쓰기
2 / 온라인 스토어 저장
3 / 온라인 스토어 읽기
SageMaker Pipelines 추가 과금 없음 사용하는 인프라에 대해서만 과금
지금 곧바로 서울 리전에서 사용 가능
40. Train and predict with ML from purpose-built databases
Bringing Machine Learning To Even More Builders
41. Amazon Redshift ML
SQL users can create models and make predictions on data in their data
warehouse
Automatically create and train ML models
Apply ML models on Amazon Redshift data using standard SQL
Embed predictions like fraud detection and risk scoring
Amazon Redshift ML
Analyze data and do high-
performance reporting
Create
Use the “create models”
command in SQL to
create the ML model in
Amazon Redshift
Train
Amazon SageMaker
automatically tunes
and trains the best
ML model
Predict
Use SQL queries to make
predictions like projected
churn, pricing, and risk
Collect and load
data into your
warehouse
Deploy
Amazon Redshift ML
automatically deploys
the ML model
P R E V I E W
43. Amazon Neptune ML
Easy, accurate predictions on graph data powered by Deep Graph Library
and Amazon SageMaker
44. AWS Glue DataBrew
Clean and normalize data with a visual interface
250+ built-in transformations without writing code
Work on large datasets at scale
Visual data preparation for analytics and machine learning
45. AWS Glue DataBrew 예시 – Missing values 처리
https://aws.amazon.com/ko/blogs/big-data/7-most-common-data-preparation-transformations-in-aws-glue-databrew/
46. Amazon QuickSight Q
M L - P O W E R E D N A T U R A L L A N G U A G E C A P A B I L I T Y I N A M A Z O N Q U I C K S I G H T
Enter business questions in search
bar and get answer in seconds
ML generates data models that automatically
understand meanings and relationships
Not limited to only asking a specific set of
questions
P R E V I E W
“What’s the best selling
category in Califonia” to Q
47. Awesome
AI/ML Services
visual interface to prepare data for ML
SageMaker DataWrangler
discover, store, and share ML Features
SageMaker FeatureStore
DevOps capabilities ML projects
SageMaker Pipelines
Train and predict with ML from purpose-built databases
Redshift & Neptune ML
Visual data preparation for analytics and machine learning
Glue DataBrew
QuickSight Q
ML-powered natural language capability in Amazon QuickSight