SlideShare a Scribd company logo
[AWS Innovate 온라인 컨퍼런스] Amazon SageMaker 신규 기능을 활용한 다양한 ML 모델 실험해 보기 - 서지혜, AWS AI/ML 스페셜리스트
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker 신규 기능을
활용한 다양한 ML 모델 실험해 보기
Seo, Jihye
AI/ML Specialist SA
AWS
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
SageMaker 소개
머신러닝 과학자를 위한 통합 IDE SageMaker Studio & Notebook
데이터 전처리를 위한 SageMaker Processing
학습 Job 관리를 위한 SageMaker Experiment
학습 상태를 모티터링 하기 위한 SageMaker Debugger
데이터 전처리,학습 알고리즘 선택, 튜닝까지 알아서! Sagemaker AutoPilot
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
데이터 프로세싱 및
레이블링
원클릭 노트북 공유 및
고성능 알고리즘 및
모델
원클릭 트레이닝 디버깅 및 최적화
원클릭 배포 및
오토스케일링
Experiments를 통해
Job을 비교 및 시각화
Data drift를
자동으로 감지
완전 관리 및
오토스케일링,
최대 75% 절감
Prepare Build Train & Tune Deploy & Manage
101011010
010101010
000011110
Collect and
prepare
training data
Choose or build an
ML algorithm
Set up and manage
environments
for training
Train, debug, and
tune models
Deploy
model in
production
Manage training runs Monitor
models
예측결과를
사람을 통해
확인
Web-based IDE for machine learning
Automatically build and train models
Amazon SageMaker 머신 러닝을 위한 툴
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
데이터 프로세싱 및
레이블링
원클릭 노트북 공유 및
고성능 알고리즘 및
모델
원클릭 트레이닝 디버깅 및 최적화
원클릭 배포 및
오토스케일링
Experiments를 통해
Job을 비교 및 시각화
Data drift를
자동으로 감지
완전 관리 및
오토스케일링,
최대 75% 절감
Prepare Build Train & Tune Deploy & Manage
101011010
010101010
000011110
Collect and
prepare
training data
Choose or build an
ML algorithm
Set up and manage
environments
for training
Train, debug, and
tune models
Deploy
model in
production
Manage training runs Monitor
models
예측결과를
사람을 통해
확인
Web-based IDE for machine learning
Automatically build and train models
Amazon SageMaker 머신 러닝을 위한 툴
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker
머신 러닝 학습을 위한 신규 서비스
Amazon SageMaker
Studio
Amazon SageMaker
Notebooks
(Preview)
Amazon SageMaker
DebuggerAmazon SageMaker
Experiments
Amazon SageMaker
AutopilotAmazon SageMaker
Processing
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
SageMaker Studio와 신규 Notebook 서비스는 왜?
• 데이터 사이언스 팀에서 여러 데이터 사이언티스트들은 종종 단일 AWS
계정을 공유합니다. 데이터 사이언티스트는 AWS 콘솔을 사용하고 싶지
않으며 IT 팀 또한 이를 원하지 않습니다.
• Notebook 인스턴스는 재시작 하는데 시간이 걸리고 많은 사용자들이 한
인스턴스 타입을 코딩, 전처리, 학습을 하는데 동일하게 사용합니다.
따라서 불필요하게 고사양의 노트북 인스턴스를 사용하고 있습니다.
• 여러명의 데이터 사이언티스트 간에는 github 등을 를 통해 소스를
공유하기도 하지만 동일한 라이브러리 Dependency와 머신러닝
프레임워크 환경 차이로 인해 공유받은 소스 코드를 바로 실행해 보기가
어렵습니다.
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Studio
• Amazon SageMaker Studio는 계정 당 여러 사용자를 지원
• AWS Single Sign-On(SSO) 또는 IAM 역할(Role)을 사용하여 사용자 관리
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Studio
SageMaker Studio 생성
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Studio
SageMaker Studio 생성
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Studio
SageMaker Studio 생성
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Studio
SageMaker Studio 생성
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Studio
1. SSO 로그인 : 사용자에게 초대 메일 발송. 초기 로그인 시 패스워드 세팅
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Studio
1. SSO 로그인 : 전용 URL로 접속
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Studio
https://d-1nbr4jxdocow.studio.us-east-
2.sagemaker.aws/jupyter/default
2. IAM 사용자로 로그인 하기
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Studio
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Notebook 아키텍처
Jupyter Server
• 사용자당 1개 할당
• 서버 무료
• Storage
- data는 EFS에 저장
- Snapsot은 S3 사용
Jupyter Kernels
• Notebook Cell을 실행
• Kernel instance 사용에
따라 과금 발생
JupyterLAB에 Sagemaker전용 plug-in을 추가
Jupyter Kernel Gateway를 통해 다양한
Notebook환경을 제공
Source: https://jupyter-kernel-gateway.readthedocs.io/en/latest/
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Experiments
대규모 실험 추적 최상 결과 시각화 평가 지표 기록 빠르게 반복 가능
실험 및 사용자의 매개 변수
및 평가 지표(metrics) 추적
맞춤형 실험 구성
팀, 목표, 가설에 의해
실험 구성
각 실험 간 시각화
및 비교
Python SDK와 API를
사용하여 맞춤 평가 지표를
기록하고 모델 추적
반복 학습을 통한 고품질
모델 개발
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
from smexperiments.experiment import Experiment
mnist_experiment = Experiment.create(
experiment_name="mnist-hand-written-digits-classification",
description="Classification of mnist hand-written digits",
sagemaker_boto_client=sm)
cnn_trial.add_trial_component(tracker.trial_component)
cnn_trial = Trial.create(
trial_name=trial_name,
experiment_name=mnist_experiment.experiment_name,
sagemaker_boto_client=sm,)
Experiment
생성
Trial 생성
Experiments & Trials
estimator.fit()
estimator.fit(
inputs={'training': inputs},
job_name=cnn_training_job_name,
experiment_config={
"TrialName": cnn_trial.trial_name,
"TrialComponentDisplayName": "Training",
},wait=True,)
from smexperiments.tracker import Tracker
with Tracker.create(display_name="Preprocessing",
sagemaker_boto_client=sm) as tracker:
tracker.log_parameters({
"normalization_mean": 0.1307, "normalization_std": 0.3081,
})
tracker.log_input(name="mnist-dataset", media_type="s3/uri", value=inputs)
Tracker
생성
https://aws.amazon.com/ko/blogs/aws/amazon-sagemaker-experiments-organize-track-and-compare-your-machine-learning-trainings/ 참고
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Trial간 Metric 비교
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
데이터 검증 및 EDA(Exploratory Data Analysis)
Images from https://towardsdatascience.com/exploratory-data-analysis-8fc1cb20fd151
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
전처리 예제
- Null 값 제거
- 중복 값 또는 중복 라인
- Class 값들을 수치로 변환
- One-hot encoding
- 수치 값 Scaling
42개 열

72개 열
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Processing
데이터 처리 및 모델 평가를 위한 분석 작업 수행
SageMaker 빌트인 컨테이너
및 사용자 정의 컨테이너 지원
피쳐 엔지니어링을 위한
사용자 정의 스크립트
맞춤형 프로세싱
클러스터에 대한 분산
처리 제공
리소스 자동 생성, 설정 및
종료
SageMaker의 보안 및
규정 준수 기능 활용
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
# Built-in Scikit Learn Container
from sagemaker.sklearn.processing import SKLearnProcessor
processor = SKLearnProcessor(framework_version='0.20.0',
role=role,
instance_type='ml.m5.xlarge',
instance_count=1)
# Your Own Container
from sagemaker.processing import ScriptProcessor
processor = ScriptProcessor(image_uri='123456789012.dkr.ecr.us-west-2.
amazonaws.com/sagemaker-spacy-container:latest’,
role=role,
instance_count=1,
instance_type='ml.m5.xlarge')
from sagemaker.processing import ProcessingInput, ProcessingOutput
processor.run(
code='preprocessing.py',
inputs=[ProcessingInput(
source='dataset.csv',
destination='/opt/ml/processing/input')],
outputs=[ProcessingOutput(source='/opt/ml/processing/output/train'),
ProcessingOutput(source='/opt/ml/processing/output/validation'),
ProcessingOutput(source='/opt/ml/processing/output/test')]
)
Processing
Container
s3://bucket/path
/to/output_data
s3://bucket/path
/to/input_data
Instance 1
Cluster
/opt/ml/processing/inp
ut
/opt/ml/processing/out
put
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
학습이 잘 되는 지 무엇을 확일해 봐야할까요?
• Vanishing gradients
• Exploding gradients
• Epoch마다 Loss 가 줄어들지 않는 경우
• Weight 업데이트가 너무 작거나 너무 큰경우
• Tensor의 값이 모두 0 인 경우
학습 과정에 위 모든 것들이 영향을 줄수 있습니다.
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
데이터 분석 및 디버깅관련 데이터 캡처 자동 에러 감지 기능 경고(alerts)에 의한
생산성 향상
시각적 분석
및 디버깅
코드 변경 없이 데이터
분석 및 디버깅
분석을 위해 데이터가
자동으로 캡처됨
규칙에 따라 에러 자동 감지 경고 기반 수정 조치 수행 SageMaker Studio와
연계 가능
Amazon SageMaker Debugger
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker Debugger 동작방식
Training in progress Analysis in
progress
Customer’s S3 Bucket
Amazon CloudWatch
Event
Amazon SageMaker
Amazon SageMaker
Studio Visualization
Amazon SageMaker
Notebook
Action  Stop the training
Action  Analyze using
Debugger SDK
Action  Visualize Tensors
using charts
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Early Stopping
• 룰에 따라 디버거가 해당 메트릭 모니터링 문제가 발견 되었을경우 “IssuesFound” 로 Job
상태 변경
• CloudWatch Event 와 연계된 Lambda를 통해 훈련 Job을 정지 할수 있음
Training job
Debugger
job
Loss value
4.2 5.8
Status
InProgress IssuesFound
Amazon CloudWatch
Detect state changes
AWS Lambda
X
Lambda function
Write the job stop code
in advance
Stop
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Debugger Built-in Rules
from sagemaker.debugger import Rule, CollectionConfig, rule_configs
exploding_tensor_rule = Rule.sagemaker(
base_config=rule_configs.exploding_tensor(),
rule_parameters={"collection_names": "weights,losses"},
collections_to_save=[
CollectionConfig("weights"),
CollectionConfig("losses")
]
)
vanishing_gradient_rule = Rule.sagemaker(
base_config=rule_configs.vanishing_gradient()
)
import sagemaker as sm
sagemaker_estimator = sm.tensorflow.TensorFlow(
entry_point='src/mnist.py',
role=sm.get_execution_role(),
base_job_name='smdebug-demo-job',
train_instance_count=1,
train_instance_type="ml.m4.xlarge",
framework_version="1.15",
py_version="py3",
# smdebug-specific arguments below
rules=[exploding_tensor_rule, vanishing_gradient_rule],
)
sagemaker_estimator.fit()
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
from sagemaker.debugger import Rule, CollectionConfig
custom_coll = CollectionConfig(
name="relu_activations",
parameters={
"include_regex": "relu",
"save_interval": "500",
"end_step": "5000" })
improper_activation_rule = Rule.custom(
name='improper_activation_job',
image_uri='552407032007.dkr.ecr.ap-south-
1.amazonaws.com/sagemaker-debugger-rule-
evaluator:latest',
instance_type='ml.c4.xlarge',
volume_size_in_gb=400,
source='rules/custom_rules.py',
rule_to_invoke='ImproperActivation',
rule_parameters={"collection_names":
"relu_activations"},
collections_to_save=[custom_coll] )
Debugger Custom Rules
import sagemaker as sm
sagemaker_estimator = sm.tensorflow.TensorFlow(
entry_point='src/mnist.py',
role=sm.get_execution_role(),
base_job_name='smdebug-demo-job',
train_instance_count=1,
train_instance_type="ml.m4.xlarge",
framework_version="1.15",
py_version="py3",
# smdebug-specific arguments below
rules=[improper_activation_rule],
)
sagemaker_estimator.fit()
Default tensor emitting interval Step = 500
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Debugger Custom Rules (소스 코드 hook 생성)
import smdebug.tensorflow as smd
def train(batch_size, epoch, model):
….
def main():
…
model = ResNet50(weights=None, input_shape=(32,32,3), classes=10)
# Create hook from the configuration provided through sagemaker python sdk
hook = smd.KerasHook.create_from_json_file()
opt = tf.keras.optimizers.Adam()
# wrap the optimizer so the hook can identify the gradients
opt = hook.wrap_optimizer(opt)
model.compile(loss='categorical_crossentropy',
optimizer=opt,
metrics=['accuracy'])
# start the training.
train(opt.batch_size, opt.epoch, model)
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
빠르게 시작 가능
표(tabular) 형식으로 데이터
제공 및 타겟 변수 지정
자동 모델 생성
피쳐 엔지니어링 및 자동 모델
튜닝을 통한 ML 모델 자동 생성
가시성 및 데이터
제어
모델에 맞는 노트북 소스 코드
완벽한 가시성 및 제어 기능을 갖춘 자동 모델 생성
추천 및 최적화 기능
리더보드 확보 및 모델
개선 지속
Amazon SageMaker Autopilot
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
SageMaker Autopilot 동작 방식
문제 유형
• Linear regression
• Binary Classification
• Multi-Class classification
지원 알고리즘
• XGBoost
• Linear Learner
+ 계속 추가 예정
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Simple to get started
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Under the hood
1 7 250
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Autopilot에서 자동 생성된 노트북
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Autopilot에서 자동 생성된 노트북
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Autopilot에서 자동 생성된 노트북
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Autopilot에서 자동 생성된 노트북
XGBoost
Tree depth
Max leaf nodes
Gamma
Eta
Lambda
Alpha
Etc.
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Hyperparameter 튜닝 결과 비교
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
#
Model Accuracy Latency Model Size
1
churn-xgboost-1756-013-
33398f0
95% 450 ms 9.1 MB
2 churn-xgboost-1756-014-53facc2 93% 200 ms 4.8 MB
3
churn-xgboost-1756-015-
58bc692
92% 200 ms 4.3 MB
4 churn-linear-1756-016-db54598 91% 50 ms 1.3 MB
5 churn-xgboost-1756-017-af8d756 91% 190 ms 4.2 MB
모델 트레이닝 Tradeoffs
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS 머신러닝(ML) 교육 및 자격증
Amazon의 개발자와 데이터 과학자를 교육하는 데 직접 활용 되었던 커리큘럼을 기반으로 학습하세요!
전체 팀을 위한
머신러닝 교육
원하는 방법으로!
교육 유연성 제공
전문성에 대한
검증
비즈니스 의사 결정자,
데이터 과학자, 개발자,
데이터 플랫폼 엔지니어 등
역할에 따라 제공되는
맞춤형 학습 경로를
확인하세요.
약 65개 이상의
온라인 과정 및
AWS 전문 강사를 통해
실습과 실적용의 기회가
제공되는 강의실 교육이
준비되어 있습니다.
업계에서 인정받는
‘AWS 공인 머신러닝 – 전문분야’
자격증을 통해
머신러닝 모델을 구축, 학습,
튜닝 및 배포하는 데 필요한
전문 지식이 있음을
입증할 수 있습니다.
https://aws.amazon.com/ko/traini
ng/learning-paths/machine-
learning/
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Innovate 온라인 컨퍼런스에 참석해주셔서
대단히 감사합니다.
aws-korea-marketing@amazon.com
twitter.com/AWSKorea
facebook.com/amazonwebservices.ko
youtube.com/user/AWSKorea
slideshare.net/awskorea
twitch.tv/aws
저희가 준비한 내용, 어떻게 보셨나요?
더 나은 세미나를 위하여 설문을 꼭 작성해 주시기 바랍니다.

More Related Content

PDF
[AWS Innovate 온라인 컨퍼런스] Amazon Personalize를 통한 개인화 추천 기능 실전 구현하기 - 최원근, AWS 솔...
PDF
Amazon SageMaker 오버뷰 - 강성문, AWS AI/ML 스페셜리스트 :: AIML 특집 웨비나
PDF
[AWS Innovate 온라인 컨퍼런스] ML 모델 생성 및 운영 효율화를 높이는 Amazon SageMaker의 신규 기능들 - 남궁...
PDF
[AWS Dev Day] 인공지능 / 기계 학습 | 기계 학습 싸고 빠르게 하는 방법 - Amazon SageMaker 편 - 김필호 AW...
PPTX
AWS 인프라/아키텍쳐 최적화를 통한 비용절감 - 최인영, AWS 솔루션 아키텍트 :: AWS Travel and Transportatio...
PDF
데이터 과학자를 위한 신규 인공지능 서비스 - 김대근, 이유동, AWS AI/ML 스페셜리스트 솔루션즈 아키텍트 / 소성운, 카카오스타일 ...
PDF
[AWS Builders 온라인 시리즈] AWS, 최적의 비용 효율화 방법은? - 조효원, AWS Cloud Financial Manager
PDF
[AWS Innovate 온라인 컨퍼런스] Amazon Forecast를 통한 시계열 예측 활용하기 - 김종선, AWS 솔루션즈 아키텍트
[AWS Innovate 온라인 컨퍼런스] Amazon Personalize를 통한 개인화 추천 기능 실전 구현하기 - 최원근, AWS 솔...
Amazon SageMaker 오버뷰 - 강성문, AWS AI/ML 스페셜리스트 :: AIML 특집 웨비나
[AWS Innovate 온라인 컨퍼런스] ML 모델 생성 및 운영 효율화를 높이는 Amazon SageMaker의 신규 기능들 - 남궁...
[AWS Dev Day] 인공지능 / 기계 학습 | 기계 학습 싸고 빠르게 하는 방법 - Amazon SageMaker 편 - 김필호 AW...
AWS 인프라/아키텍쳐 최적화를 통한 비용절감 - 최인영, AWS 솔루션 아키텍트 :: AWS Travel and Transportatio...
데이터 과학자를 위한 신규 인공지능 서비스 - 김대근, 이유동, AWS AI/ML 스페셜리스트 솔루션즈 아키텍트 / 소성운, 카카오스타일 ...
[AWS Builders 온라인 시리즈] AWS, 최적의 비용 효율화 방법은? - 조효원, AWS Cloud Financial Manager
[AWS Innovate 온라인 컨퍼런스] Amazon Forecast를 통한 시계열 예측 활용하기 - 김종선, AWS 솔루션즈 아키텍트

What's hot (20)

PDF
[AWS Innovate 온라인 컨퍼런스] 한국어를 위한 AWS 인공지능(AI) 서비스 소개 및 활용 방법 - 강정희, AWS 솔루션즈 아키텍트
PDF
AWS IoT로 예지정비 실현하기 - 이종화 솔루션즈 아키텍트, AWS
PDF
AWS와 함께하는 클라우드 컴퓨팅 (강철 AWS 매니저) :: AWS 기초 교육 온라인 세미나
PDF
AWS Builders - Industry Edition: AWS가 추천하는 'App개발 및 데이터 관리, 분석 소프트웨어 서비스'_Tma...
PPTX
AWS 의 비용 절감 프레임워크와 신규 프로그램을 활용한 전략적 비용절감 :: AWS Travel and Transportation 온라인...
PDF
[2017 Gaming on AWS] 도커 컨테이너 배포 자동화 실습 (롤링 및 Blue/Green 배포)
PDF
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...
PDF
게임 데이터 분석을 위한 Data Lake 구축과 Machine Learning 을 활용한 분석 Hands on Lab (안효빈 솔루션즈 ...
PDF
Amazon QLDB를 통한 원장 기반 운전 면허 검증 서비스 구현 - 윤석찬 :: AWS Unboxing 온라인 세미나
PDF
[AWS Dev Day] 이머징 테크 | AWS AI 서비스로 SAP 비지니스 프로세스 자동화하기 - 이상규 AWS 솔루션즈 아키텍트, 이...
PDF
AWS Fargate와 Amazon ECS를 사용한 CI/CD 베스트 프랙티스 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Build...
PDF
오라클 DB를 AWS 데이터베이스로 마이그레이션 하기 - 윤기원 :: AWS Database Modernization Day 온라인
PDF
SageMaker를 활용한 엔터프라이즈 머신러닝 도입 및 프로세스 개선 방법 (김필호 AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS) ...
PDF
AWS와 함께하는 스타트업 여정 AWS Activate 프로그램/스타트업에게 가장 사랑받는 AWS 서비스들 – 김민지, 박진우 :: AWS...
PDF
요금 모델 및 클라우드 애플리케이션 지원 - 정도현, AWS 테크니컬 트레이너 :: AWSome Day 온라인 컨퍼런스
PDF
AWS DeepRacer와 Amazon SageMaker RL로 강화학습 시작하기 - 강지양 솔루션즈 아키텍트, AWS
PDF
클라우드 시작하기 - 장기웅, AWS 테크니컬 트레이너 :: AWSome Day 온라인 컨퍼런스
PDF
AWS 클라우드를 통해 최소기능제품(MVP) 빠르게 개발하기 - 윤석찬 테크 에반젤리스트, AWS
PDF
[애플리케이션 현대화 및 개발] 현대적 애플리케이션 개발의 필수, 앱 배포 및 인프라 구성 자동화 - 김필중, AWS 솔루션즈 아키텍트
PDF
[AWS Dev Day] 실습워크샵 | Amplify 와 AI 서비스를 활용한 서버리스 기반 소셜 안드로이드 앱 만들기
[AWS Innovate 온라인 컨퍼런스] 한국어를 위한 AWS 인공지능(AI) 서비스 소개 및 활용 방법 - 강정희, AWS 솔루션즈 아키텍트
AWS IoT로 예지정비 실현하기 - 이종화 솔루션즈 아키텍트, AWS
AWS와 함께하는 클라우드 컴퓨팅 (강철 AWS 매니저) :: AWS 기초 교육 온라인 세미나
AWS Builders - Industry Edition: AWS가 추천하는 'App개발 및 데이터 관리, 분석 소프트웨어 서비스'_Tma...
AWS 의 비용 절감 프레임워크와 신규 프로그램을 활용한 전략적 비용절감 :: AWS Travel and Transportation 온라인...
[2017 Gaming on AWS] 도커 컨테이너 배포 자동화 실습 (롤링 및 Blue/Green 배포)
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...
게임 데이터 분석을 위한 Data Lake 구축과 Machine Learning 을 활용한 분석 Hands on Lab (안효빈 솔루션즈 ...
Amazon QLDB를 통한 원장 기반 운전 면허 검증 서비스 구현 - 윤석찬 :: AWS Unboxing 온라인 세미나
[AWS Dev Day] 이머징 테크 | AWS AI 서비스로 SAP 비지니스 프로세스 자동화하기 - 이상규 AWS 솔루션즈 아키텍트, 이...
AWS Fargate와 Amazon ECS를 사용한 CI/CD 베스트 프랙티스 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Build...
오라클 DB를 AWS 데이터베이스로 마이그레이션 하기 - 윤기원 :: AWS Database Modernization Day 온라인
SageMaker를 활용한 엔터프라이즈 머신러닝 도입 및 프로세스 개선 방법 (김필호 AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS) ...
AWS와 함께하는 스타트업 여정 AWS Activate 프로그램/스타트업에게 가장 사랑받는 AWS 서비스들 – 김민지, 박진우 :: AWS...
요금 모델 및 클라우드 애플리케이션 지원 - 정도현, AWS 테크니컬 트레이너 :: AWSome Day 온라인 컨퍼런스
AWS DeepRacer와 Amazon SageMaker RL로 강화학습 시작하기 - 강지양 솔루션즈 아키텍트, AWS
클라우드 시작하기 - 장기웅, AWS 테크니컬 트레이너 :: AWSome Day 온라인 컨퍼런스
AWS 클라우드를 통해 최소기능제품(MVP) 빠르게 개발하기 - 윤석찬 테크 에반젤리스트, AWS
[애플리케이션 현대화 및 개발] 현대적 애플리케이션 개발의 필수, 앱 배포 및 인프라 구성 자동화 - 김필중, AWS 솔루션즈 아키텍트
[AWS Dev Day] 실습워크샵 | Amplify 와 AI 서비스를 활용한 서버리스 기반 소셜 안드로이드 앱 만들기
Ad

Similar to [AWS Innovate 온라인 컨퍼런스] Amazon SageMaker 신규 기능을 활용한 다양한 ML 모델 실험해 보기 - 서지혜, AWS AI/ML 스페셜리스트 (20)

PDF
Amazon SageMaker 모델 학습 방법 소개::최영준, 솔루션즈 아키텍트 AI/ML 엑스퍼트, AWS::AWS AIML 스페셜 웨비나
PDF
AWS 머신러닝 솔루션을 활용한 고객 응대 자동화 구축 사례 공유 - 이창명, CTO, 위메이드 플레이 ::: Games on AWS 2022
PDF
Amazon Personalize 개인화 추천 모델 만들기::김태수, 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
PDF
Amazon SageMaker 모델 빌딩 파이프라인 소개::이유동, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스...
PDF
[25D2S08]_Amazon Bedrock과 SageMaker를 이용한 LLM 파인튜닝 및 커스터마ᄋ...
PDF
AI/ML re:invent 2019 recap at Delivery Hero Korea
PDF
AWS Builders 3: 인공지능을 활용하여 설비 및 생산 라인에서의 이상 감지 고도화하기
PDF
Amazon SageMaker를 이용한 예측 분석-남궁영환 솔루션즈 아키텍트, AWS
PDF
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
PDF
AWS re:Invent 2020 Awesome AI/ML Services
PDF
AWS로 게임 런칭 준비하기 ::: 장준성, 채민관, AWS Game Master 온라인 시리즈 #4
PDF
AWS 기계 학습 솔루션을 활용한 온라인 사기·부정거래 감지 – 서지혜 AWS 스타트업 AIML 스페셜리스트:: AWS Cloud Week...
PDF
20200923 amazon personalize service webinar presentation file_public
PDF
D1T1S2_넥슨의 LLM 에이전트 길들이기-인프라 모니터링 서비스 적용 사례_F.pdf
PDF
핵심 미래 분석 기술! 시계열 분석을 활용한 수요예측과 재고관리 최적화 사례 – 김형일 AWS 솔루션즈 아키텍트, 이환기 신세계아이앤씨 A...
PDF
개인화 추천 및 시계열 예측을 위한 신규 AI 서비스 살펴보기 - 남궁영환 AI/ML 스페셜리스트 솔루션즈 아키텍트 :: AWS Inno...
PDF
옵저버빌러티(Observability) 확보로 서버리스 마이크로서비스 들여다보기 - 김형일 AWS 솔루션즈 아키텍트 :: AWS Summi...
PDF
AWS의 비용 효율적 고성능기계학습(ML) 플랫폼 뛰어들기 - 윤석찬 수석 테크 에반젤리스트, AWS :: AWS Innovate 2019
PDF
AWS Summit Seoul 2023 | 천만 사용자 서비스를 위한 Amazon SageMaker 활용 방법 진화하기
PPTX
D1T4S2_클라우드를 넘어, 보험사의 미래를 그리다_241104_블로그포스팅용....
Amazon SageMaker 모델 학습 방법 소개::최영준, 솔루션즈 아키텍트 AI/ML 엑스퍼트, AWS::AWS AIML 스페셜 웨비나
AWS 머신러닝 솔루션을 활용한 고객 응대 자동화 구축 사례 공유 - 이창명, CTO, 위메이드 플레이 ::: Games on AWS 2022
Amazon Personalize 개인화 추천 모델 만들기::김태수, 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 빌딩 파이프라인 소개::이유동, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스...
[25D2S08]_Amazon Bedrock과 SageMaker를 이용한 LLM 파인튜닝 및 커스터마ᄋ...
AI/ML re:invent 2019 recap at Delivery Hero Korea
AWS Builders 3: 인공지능을 활용하여 설비 및 생산 라인에서의 이상 감지 고도화하기
Amazon SageMaker를 이용한 예측 분석-남궁영환 솔루션즈 아키텍트, AWS
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
AWS re:Invent 2020 Awesome AI/ML Services
AWS로 게임 런칭 준비하기 ::: 장준성, 채민관, AWS Game Master 온라인 시리즈 #4
AWS 기계 학습 솔루션을 활용한 온라인 사기·부정거래 감지 – 서지혜 AWS 스타트업 AIML 스페셜리스트:: AWS Cloud Week...
20200923 amazon personalize service webinar presentation file_public
D1T1S2_넥슨의 LLM 에이전트 길들이기-인프라 모니터링 서비스 적용 사례_F.pdf
핵심 미래 분석 기술! 시계열 분석을 활용한 수요예측과 재고관리 최적화 사례 – 김형일 AWS 솔루션즈 아키텍트, 이환기 신세계아이앤씨 A...
개인화 추천 및 시계열 예측을 위한 신규 AI 서비스 살펴보기 - 남궁영환 AI/ML 스페셜리스트 솔루션즈 아키텍트 :: AWS Inno...
옵저버빌러티(Observability) 확보로 서버리스 마이크로서비스 들여다보기 - 김형일 AWS 솔루션즈 아키텍트 :: AWS Summi...
AWS의 비용 효율적 고성능기계학습(ML) 플랫폼 뛰어들기 - 윤석찬 수석 테크 에반젤리스트, AWS :: AWS Innovate 2019
AWS Summit Seoul 2023 | 천만 사용자 서비스를 위한 Amazon SageMaker 활용 방법 진화하기
D1T4S2_클라우드를 넘어, 보험사의 미래를 그리다_241104_블로그포스팅용....
Ad

More from Amazon Web Services Korea (20)

PDF
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
PDF
[D3T1S06] Neptune Analytics with Vector Similarity Search
PDF
[D3T1S03] Amazon DynamoDB design puzzlers
PDF
[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use...
PDF
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
PDF
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
PDF
[D3T1S02] Aurora Limitless Database Introduction
PDF
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
PDF
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
PDF
AWS Modern Infra with Storage Roadshow 2023 - Day 2
PDF
AWS Modern Infra with Storage Roadshow 2023 - Day 1
PDF
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
PDF
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
PDF
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
PDF
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
PDF
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
PDF
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
PDF
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
PDF
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
PDF
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
[D3T1S06] Neptune Analytics with Vector Similarity Search
[D3T1S03] Amazon DynamoDB design puzzlers
[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use...
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
[D3T1S02] Aurora Limitless Database Introduction
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 1
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...

[AWS Innovate 온라인 컨퍼런스] Amazon SageMaker 신규 기능을 활용한 다양한 ML 모델 실험해 보기 - 서지혜, AWS AI/ML 스페셜리스트

  • 2. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker 신규 기능을 활용한 다양한 ML 모델 실험해 보기 Seo, Jihye AI/ML Specialist SA AWS
  • 3. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda SageMaker 소개 머신러닝 과학자를 위한 통합 IDE SageMaker Studio & Notebook 데이터 전처리를 위한 SageMaker Processing 학습 Job 관리를 위한 SageMaker Experiment 학습 상태를 모티터링 하기 위한 SageMaker Debugger 데이터 전처리,학습 알고리즘 선택, 튜닝까지 알아서! Sagemaker AutoPilot
  • 4. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 5. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. 데이터 프로세싱 및 레이블링 원클릭 노트북 공유 및 고성능 알고리즘 및 모델 원클릭 트레이닝 디버깅 및 최적화 원클릭 배포 및 오토스케일링 Experiments를 통해 Job을 비교 및 시각화 Data drift를 자동으로 감지 완전 관리 및 오토스케일링, 최대 75% 절감 Prepare Build Train & Tune Deploy & Manage 101011010 010101010 000011110 Collect and prepare training data Choose or build an ML algorithm Set up and manage environments for training Train, debug, and tune models Deploy model in production Manage training runs Monitor models 예측결과를 사람을 통해 확인 Web-based IDE for machine learning Automatically build and train models Amazon SageMaker 머신 러닝을 위한 툴
  • 6. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. 데이터 프로세싱 및 레이블링 원클릭 노트북 공유 및 고성능 알고리즘 및 모델 원클릭 트레이닝 디버깅 및 최적화 원클릭 배포 및 오토스케일링 Experiments를 통해 Job을 비교 및 시각화 Data drift를 자동으로 감지 완전 관리 및 오토스케일링, 최대 75% 절감 Prepare Build Train & Tune Deploy & Manage 101011010 010101010 000011110 Collect and prepare training data Choose or build an ML algorithm Set up and manage environments for training Train, debug, and tune models Deploy model in production Manage training runs Monitor models 예측결과를 사람을 통해 확인 Web-based IDE for machine learning Automatically build and train models Amazon SageMaker 머신 러닝을 위한 툴
  • 7. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker 머신 러닝 학습을 위한 신규 서비스 Amazon SageMaker Studio Amazon SageMaker Notebooks (Preview) Amazon SageMaker DebuggerAmazon SageMaker Experiments Amazon SageMaker AutopilotAmazon SageMaker Processing
  • 8. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 9. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. SageMaker Studio와 신규 Notebook 서비스는 왜? • 데이터 사이언스 팀에서 여러 데이터 사이언티스트들은 종종 단일 AWS 계정을 공유합니다. 데이터 사이언티스트는 AWS 콘솔을 사용하고 싶지 않으며 IT 팀 또한 이를 원하지 않습니다. • Notebook 인스턴스는 재시작 하는데 시간이 걸리고 많은 사용자들이 한 인스턴스 타입을 코딩, 전처리, 학습을 하는데 동일하게 사용합니다. 따라서 불필요하게 고사양의 노트북 인스턴스를 사용하고 있습니다. • 여러명의 데이터 사이언티스트 간에는 github 등을 를 통해 소스를 공유하기도 하지만 동일한 라이브러리 Dependency와 머신러닝 프레임워크 환경 차이로 인해 공유받은 소스 코드를 바로 실행해 보기가 어렵습니다.
  • 10. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Studio • Amazon SageMaker Studio는 계정 당 여러 사용자를 지원 • AWS Single Sign-On(SSO) 또는 IAM 역할(Role)을 사용하여 사용자 관리
  • 11. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Studio SageMaker Studio 생성
  • 12. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Studio SageMaker Studio 생성
  • 13. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Studio SageMaker Studio 생성
  • 14. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Studio SageMaker Studio 생성
  • 15. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Studio 1. SSO 로그인 : 사용자에게 초대 메일 발송. 초기 로그인 시 패스워드 세팅
  • 16. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Studio 1. SSO 로그인 : 전용 URL로 접속
  • 17. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Studio https://d-1nbr4jxdocow.studio.us-east- 2.sagemaker.aws/jupyter/default 2. IAM 사용자로 로그인 하기
  • 18. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Studio
  • 19. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Notebook 아키텍처 Jupyter Server • 사용자당 1개 할당 • 서버 무료 • Storage - data는 EFS에 저장 - Snapsot은 S3 사용 Jupyter Kernels • Notebook Cell을 실행 • Kernel instance 사용에 따라 과금 발생 JupyterLAB에 Sagemaker전용 plug-in을 추가 Jupyter Kernel Gateway를 통해 다양한 Notebook환경을 제공 Source: https://jupyter-kernel-gateway.readthedocs.io/en/latest/
  • 20. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 21. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Experiments 대규모 실험 추적 최상 결과 시각화 평가 지표 기록 빠르게 반복 가능 실험 및 사용자의 매개 변수 및 평가 지표(metrics) 추적 맞춤형 실험 구성 팀, 목표, 가설에 의해 실험 구성 각 실험 간 시각화 및 비교 Python SDK와 API를 사용하여 맞춤 평가 지표를 기록하고 모델 추적 반복 학습을 통한 고품질 모델 개발
  • 22. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. from smexperiments.experiment import Experiment mnist_experiment = Experiment.create( experiment_name="mnist-hand-written-digits-classification", description="Classification of mnist hand-written digits", sagemaker_boto_client=sm) cnn_trial.add_trial_component(tracker.trial_component) cnn_trial = Trial.create( trial_name=trial_name, experiment_name=mnist_experiment.experiment_name, sagemaker_boto_client=sm,) Experiment 생성 Trial 생성 Experiments & Trials estimator.fit() estimator.fit( inputs={'training': inputs}, job_name=cnn_training_job_name, experiment_config={ "TrialName": cnn_trial.trial_name, "TrialComponentDisplayName": "Training", },wait=True,) from smexperiments.tracker import Tracker with Tracker.create(display_name="Preprocessing", sagemaker_boto_client=sm) as tracker: tracker.log_parameters({ "normalization_mean": 0.1307, "normalization_std": 0.3081, }) tracker.log_input(name="mnist-dataset", media_type="s3/uri", value=inputs) Tracker 생성 https://aws.amazon.com/ko/blogs/aws/amazon-sagemaker-experiments-organize-track-and-compare-your-machine-learning-trainings/ 참고
  • 23. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Trial간 Metric 비교
  • 24. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 25. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. 데이터 검증 및 EDA(Exploratory Data Analysis) Images from https://towardsdatascience.com/exploratory-data-analysis-8fc1cb20fd151
  • 26. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. 전처리 예제 - Null 값 제거 - 중복 값 또는 중복 라인 - Class 값들을 수치로 변환 - One-hot encoding - 수치 값 Scaling 42개 열  72개 열
  • 27. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Processing 데이터 처리 및 모델 평가를 위한 분석 작업 수행 SageMaker 빌트인 컨테이너 및 사용자 정의 컨테이너 지원 피쳐 엔지니어링을 위한 사용자 정의 스크립트 맞춤형 프로세싱 클러스터에 대한 분산 처리 제공 리소스 자동 생성, 설정 및 종료 SageMaker의 보안 및 규정 준수 기능 활용
  • 28. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. # Built-in Scikit Learn Container from sagemaker.sklearn.processing import SKLearnProcessor processor = SKLearnProcessor(framework_version='0.20.0', role=role, instance_type='ml.m5.xlarge', instance_count=1) # Your Own Container from sagemaker.processing import ScriptProcessor processor = ScriptProcessor(image_uri='123456789012.dkr.ecr.us-west-2. amazonaws.com/sagemaker-spacy-container:latest’, role=role, instance_count=1, instance_type='ml.m5.xlarge') from sagemaker.processing import ProcessingInput, ProcessingOutput processor.run( code='preprocessing.py', inputs=[ProcessingInput( source='dataset.csv', destination='/opt/ml/processing/input')], outputs=[ProcessingOutput(source='/opt/ml/processing/output/train'), ProcessingOutput(source='/opt/ml/processing/output/validation'), ProcessingOutput(source='/opt/ml/processing/output/test')] ) Processing Container s3://bucket/path /to/output_data s3://bucket/path /to/input_data Instance 1 Cluster /opt/ml/processing/inp ut /opt/ml/processing/out put
  • 29. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 30. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. 학습이 잘 되는 지 무엇을 확일해 봐야할까요? • Vanishing gradients • Exploding gradients • Epoch마다 Loss 가 줄어들지 않는 경우 • Weight 업데이트가 너무 작거나 너무 큰경우 • Tensor의 값이 모두 0 인 경우 학습 과정에 위 모든 것들이 영향을 줄수 있습니다.
  • 31. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. 데이터 분석 및 디버깅관련 데이터 캡처 자동 에러 감지 기능 경고(alerts)에 의한 생산성 향상 시각적 분석 및 디버깅 코드 변경 없이 데이터 분석 및 디버깅 분석을 위해 데이터가 자동으로 캡처됨 규칙에 따라 에러 자동 감지 경고 기반 수정 조치 수행 SageMaker Studio와 연계 가능 Amazon SageMaker Debugger
  • 32. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Debugger 동작방식 Training in progress Analysis in progress Customer’s S3 Bucket Amazon CloudWatch Event Amazon SageMaker Amazon SageMaker Studio Visualization Amazon SageMaker Notebook Action  Stop the training Action  Analyze using Debugger SDK Action  Visualize Tensors using charts
  • 33. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Early Stopping • 룰에 따라 디버거가 해당 메트릭 모니터링 문제가 발견 되었을경우 “IssuesFound” 로 Job 상태 변경 • CloudWatch Event 와 연계된 Lambda를 통해 훈련 Job을 정지 할수 있음 Training job Debugger job Loss value 4.2 5.8 Status InProgress IssuesFound Amazon CloudWatch Detect state changes AWS Lambda X Lambda function Write the job stop code in advance Stop
  • 34. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Debugger Built-in Rules from sagemaker.debugger import Rule, CollectionConfig, rule_configs exploding_tensor_rule = Rule.sagemaker( base_config=rule_configs.exploding_tensor(), rule_parameters={"collection_names": "weights,losses"}, collections_to_save=[ CollectionConfig("weights"), CollectionConfig("losses") ] ) vanishing_gradient_rule = Rule.sagemaker( base_config=rule_configs.vanishing_gradient() ) import sagemaker as sm sagemaker_estimator = sm.tensorflow.TensorFlow( entry_point='src/mnist.py', role=sm.get_execution_role(), base_job_name='smdebug-demo-job', train_instance_count=1, train_instance_type="ml.m4.xlarge", framework_version="1.15", py_version="py3", # smdebug-specific arguments below rules=[exploding_tensor_rule, vanishing_gradient_rule], ) sagemaker_estimator.fit()
  • 35. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. from sagemaker.debugger import Rule, CollectionConfig custom_coll = CollectionConfig( name="relu_activations", parameters={ "include_regex": "relu", "save_interval": "500", "end_step": "5000" }) improper_activation_rule = Rule.custom( name='improper_activation_job', image_uri='552407032007.dkr.ecr.ap-south- 1.amazonaws.com/sagemaker-debugger-rule- evaluator:latest', instance_type='ml.c4.xlarge', volume_size_in_gb=400, source='rules/custom_rules.py', rule_to_invoke='ImproperActivation', rule_parameters={"collection_names": "relu_activations"}, collections_to_save=[custom_coll] ) Debugger Custom Rules import sagemaker as sm sagemaker_estimator = sm.tensorflow.TensorFlow( entry_point='src/mnist.py', role=sm.get_execution_role(), base_job_name='smdebug-demo-job', train_instance_count=1, train_instance_type="ml.m4.xlarge", framework_version="1.15", py_version="py3", # smdebug-specific arguments below rules=[improper_activation_rule], ) sagemaker_estimator.fit() Default tensor emitting interval Step = 500
  • 36. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Debugger Custom Rules (소스 코드 hook 생성) import smdebug.tensorflow as smd def train(batch_size, epoch, model): …. def main(): … model = ResNet50(weights=None, input_shape=(32,32,3), classes=10) # Create hook from the configuration provided through sagemaker python sdk hook = smd.KerasHook.create_from_json_file() opt = tf.keras.optimizers.Adam() # wrap the optimizer so the hook can identify the gradients opt = hook.wrap_optimizer(opt) model.compile(loss='categorical_crossentropy', optimizer=opt, metrics=['accuracy']) # start the training. train(opt.batch_size, opt.epoch, model)
  • 37. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 38. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. 빠르게 시작 가능 표(tabular) 형식으로 데이터 제공 및 타겟 변수 지정 자동 모델 생성 피쳐 엔지니어링 및 자동 모델 튜닝을 통한 ML 모델 자동 생성 가시성 및 데이터 제어 모델에 맞는 노트북 소스 코드 완벽한 가시성 및 제어 기능을 갖춘 자동 모델 생성 추천 및 최적화 기능 리더보드 확보 및 모델 개선 지속 Amazon SageMaker Autopilot
  • 39. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. SageMaker Autopilot 동작 방식 문제 유형 • Linear regression • Binary Classification • Multi-Class classification 지원 알고리즘 • XGBoost • Linear Learner + 계속 추가 예정
  • 40. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Simple to get started
  • 41. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Under the hood 1 7 250
  • 42. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Autopilot에서 자동 생성된 노트북
  • 43. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Autopilot에서 자동 생성된 노트북
  • 44. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Autopilot에서 자동 생성된 노트북
  • 45. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Autopilot에서 자동 생성된 노트북 XGBoost Tree depth Max leaf nodes Gamma Eta Lambda Alpha Etc.
  • 46. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Hyperparameter 튜닝 결과 비교
  • 47. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. # Model Accuracy Latency Model Size 1 churn-xgboost-1756-013- 33398f0 95% 450 ms 9.1 MB 2 churn-xgboost-1756-014-53facc2 93% 200 ms 4.8 MB 3 churn-xgboost-1756-015- 58bc692 92% 200 ms 4.3 MB 4 churn-linear-1756-016-db54598 91% 50 ms 1.3 MB 5 churn-xgboost-1756-017-af8d756 91% 190 ms 4.2 MB 모델 트레이닝 Tradeoffs
  • 48. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS 머신러닝(ML) 교육 및 자격증 Amazon의 개발자와 데이터 과학자를 교육하는 데 직접 활용 되었던 커리큘럼을 기반으로 학습하세요! 전체 팀을 위한 머신러닝 교육 원하는 방법으로! 교육 유연성 제공 전문성에 대한 검증 비즈니스 의사 결정자, 데이터 과학자, 개발자, 데이터 플랫폼 엔지니어 등 역할에 따라 제공되는 맞춤형 학습 경로를 확인하세요. 약 65개 이상의 온라인 과정 및 AWS 전문 강사를 통해 실습과 실적용의 기회가 제공되는 강의실 교육이 준비되어 있습니다. 업계에서 인정받는 ‘AWS 공인 머신러닝 – 전문분야’ 자격증을 통해 머신러닝 모델을 구축, 학습, 튜닝 및 배포하는 데 필요한 전문 지식이 있음을 입증할 수 있습니다. https://aws.amazon.com/ko/traini ng/learning-paths/machine- learning/
  • 49. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Innovate 온라인 컨퍼런스에 참석해주셔서 대단히 감사합니다. aws-korea-marketing@amazon.com twitter.com/AWSKorea facebook.com/amazonwebservices.ko youtube.com/user/AWSKorea slideshare.net/awskorea twitch.tv/aws 저희가 준비한 내용, 어떻게 보셨나요? 더 나은 세미나를 위하여 설문을 꼭 작성해 주시기 바랍니다.