Search

a1.2.a9.6. [entry] title: 한국정보처리학회 강의

생성
🚀 prev note
♻️ prev note
🚀 next note
♻️ next note
14 more properties
강의
맥락
맹멘토님: 음 보통은 학계에 계시는 분들은 연구에 활용할 수 있나(=논문에 적용할 수 있나) 이런걸 많이 보시고요, 최근 트렌드 이런것도 관심 있으신 거 같아요.
일섭님: 정보처리학회에 계신 분들을 종종 보았는데 공과대학도 아니고 경영학과도 아니다. SAS, IBM SPSS 이미 경영학과에서 다루던 사람들이 노코드로 데이터 분석을 가르쳐주고 있었다. 이분들은 전반적으로 비즈니스적 관점에서 바라본다.
@9/1/2023 장후의 제안
@9/3/2023 일섭님과 함께 조율한 내용

장후부분 흐름

1.
인트로
a.
자기소개
b.
앞서 일섭님께서 웹과 앱개발과 연계된 데이터분석 수요 측면에서 SPSS, SAS와 같은 기성 노코드 도구들과 방금 실습하신 AWS Canvas와 같은 도구를 비교하며 설명해 주셨다.
c.
청자가 이것을 들으면 얻을 수 있는 점 강조: 한편 이번 세션에는 ‘인공지능 모델이 만들어지고서부터 가치를 만들기까지’ 를 주제로 기술 트렌드를 이해하는 것에 도움이 될 내용을 소개드리고자 한다. 이것이 바로 MLOps라고 불리는 키워드와도 닿아 있다고 볼 수 있다. 웹으로 머신러닝 기반의 연구결과와 관련된 데모를 보여 주거나, AI를 기반으로 실제로 창업을 하고자 하시는 분들이 큰 그림을 잡는 것에도 도움이 되지 않을까 한다.
2.
MLOps
a.
내 일이 아니라는 생각을 벗어나게 해 주기: MLOps라는 단어 재정의
앤드류 응 교수님의 MLOps 언급
인용
MLOps라는 말은 많이 들었지만, ‘운영’이 너무 먼 이야기처럼 느껴질 수 있기 때문에 이 격차를 해소해 주는 부분
MLOps는 그간 연구자들이 해왔던 모델 중심적 접근을 그만하고, 데이터에 신경을 써야 한다는 철학에서 비롯된 말이고 이 개념은 아주 중요하다.
하지만 MLOps라는 것이 생소한 사람들에게 그렇게 설명하는 것은 너무 추상적이다. 우선 MLOps를 이렇게 이해해 보자. ‘데이터, 모델, 소스코드 사이의 관계를 이해하는 일 또는 그 관계를 명료하게 해 주는 도구’
고민이 되는 포인트: 데이터, 모델, 소스코드라고 나누는 것이 습득에 도움이 될까? 오히려 헷갈리게 만드는 것은 아닐까? (직무와 더 잘 어울리도록 데이터, 모델, 잡다한 일..?)
여기 중에 실제로 소스코드 레벨에서 실험을 하는 분들. 가장 많이 사용하는 실험 관리 도구도 MLOps의 일종
데이터
모델
소스코드
플랭크현동 예시 보여주기?
머신러닝을 기반으로 하는 연구를 하는 연구자가, 더 나은 연구 결과를 만드는 것이 목표라고 생각해 본다. 그것으로 가기 위해 그림에 나타나는 것처럼 돌아야 한다면, 그것을 잘 하도록 만들어야 한다. 입력 데이터를 바꿔 보기도 하고, 모델을 바꾸어 볼 수도 있다. 그때마다 결과가 계속 달라질텐데, 이것을 더욱 잘 할 수 있도록 하는 것도 MLOps다.
3.
모델의 여행
a.
다시 원래 맥락으로 돌아옴: 환기
c.
canvas 등 도식이 모두 포함된 아키텍처를 보여주면서 앞의 강의와 mlops라는 주제 사이의 연관성을 보여 주자. 20분이라는 넉넉한 시간을 잡고 실시간 데모를 보여주자.
앞서는 노코드에 초점을 맞추었지만, 이번에는 canvas에서 모델을 학습시키고 MLOps 까지 가는 일의 연관성을 보여준다. 후루룩 보여줄 것임. 모범 사례는 아니고, 이렇게 복잡한 과정들을 거치는 것이고, 이렇게 다양한 제품들이 사용되는구나, 이것을 생태계라고 하고 그래서 특정 클라우드 플랫폼이나 MLOps 솔루션에 종속될 수 있다는 것을 직접 눈으로 보면 더 와닿는 시간이 될 것 같아서.
그림: 아키텍처
그림: Canvas에서 모델 뽑아내는 것 실습
그림: 아키텍처
인프라 개발자와 애플리케이션 개발자의 영역 vs 데이터과학자와 도메인 전문가의 영역 설명
그림: 아키텍처
그림: 파이썬 프로젝트 스캐폴드에 집어넣는 작업
그림: 아키텍처
인프라 개발자와 애플리케이션 개발자의 영역 vs 데이터과학자와 도메인 전문가의 영역 설명
해당 주소로 접속해보도록 시키기
학습된 모델 → 모델 레지스트리에 푸시 가능하다는 것 확인
Operationalize ML models built in Amazon SageMaker Canvas to production using the Amazon SageMaker Model Registry | Data Integration
실제로 설명할 때 이 각각의 이름들이 중요한 것이 아니라는 점을 강조.
모델 레지스트리에서 뭐 어쩌라고. 이 다음부터 확인 안 됨.
Choose the model to review all the versions registered to this model group and then review the corresponding model details. If you open the details for version 1, we can see that the Activity tab keeps track of all the events happening on the model. On the Model quality tab, we can review the model metrics, precision/recall curves, and confusion matrix plots to understand the model performance. On the Explainability tab, we can review the features that influenced the model’s performance the most.
let’s deploy it to an endpoint. In Studio, navigate to the model registry home page and choose the canvas-Churn-Prediction-Model model group. Choose the version to be deployed and go to the Settings tab. Browse to get the model package ARN details from the selected model version in the model registry.
여기서부터 안됨. ARN 하고 뭐 하고 자시고 해야함.
You can use production variants to compare your models, instances and containers, and choose the best performing candidate to respond to inference requests. With SageMaker multi-variant endpoints you can distribute endpoint invocation requests across multiple production variants by providing the traffic distribution for each variant, or you can invoke a specific variant directly for each request.
부하를 분산해서 테스팅해볼 수 있도록 제공하는 기능같은 것인듯.
Production variants - Amazon SageMaker
이건 개인 노트에 가져다 붙이면 좋을듯.
Model Registry 부분 ARN내용 나옴.
amazon-sagemaker-examples/serverless-inference/serverless-model-registry.ipynb at main · aws/amazon-sagemaker-examples
이것도
How to build ML Architecture with AWS SageMaker + Lambda + API Gateway | HANDS-ON TUTORIAL
This tutorial shows how to set-up a Machine Learning Architecture in Amazon Web Services by using combination of Amazon SageMaker, AWS Lambda Function, and Amazon API Gateway. The main idea is to build a workflow in cloud where a regular end user from public internet can make requests on pre-trained ML model and get a prediction (or AI-based insights) in a second back. From technical perspective, the backed works in such way: the the end use input his/her data and send it to API Gateway which uses REST API. Once the API service receive this input data, it forward it to pre-defined AWS Lambda function. Here, AWS Lambda function triggers the ML model endpoint which was created after the model training was completed and it's artifact saved in S3 bucket. Finally, the ML endpoint after received user input data, make a prediction using a pre-trained ML model and send back a predicted value in the same way through AWS Lambda to Amazon API Gateway. So, this video provides one of many ways how to deploy a Machine Learning model on the cloud using AWS. In this video, the usage of Amazon API Gateway is demonstrated either by using AWS Console and a custom Python script (where you can flexible leverage the API functionality). For demonstration purposes, in this video as an example I use breast cancer diagnosis prediction Machine Learning problem. The ML model endpoint was created specifically on this use case. You can find this notebook directly from AWS SageMaker Notebook templates. Documentation used in this tutorial, where you can find snippets for IAM role and AWS Lambda code in Python programming language used in this video: https://aws.amazon.com/blogs/machine-learning/call-an-amazon-sagemaker-model-endpoint-using-amazon-api-gateway-and-aws-lambda/ Read more related to this use case: - Amazon IAM: https://aws.amazon.com/iam/ - Amazon SageMaker: https://aws.amazon.com/pm/sagemaker/ - AWS Lambda Function: https://aws.amazon.com/lambda/ - Amazon API Gateway: https://aws.amazon.com/api-gateway/ - Also, I highly recommend to refresh you knowledge on IAM (Identity & Access Management), AWS Roles, Policies and Groups with this video: https://youtu.be/Ey9waqflzI4 The content of the tutorial: 0:00 - Explanation of ML architecture on AWS 2:15 - AWS Hand-on! Create AWS SageMaker Notebook Instance 4:49 - Explanation of Jupyter Notebook and train the ML model 8:17 - Build the SageMaker Endpoint for ML model 11:11 - Set-up AWS Lambda function 16:32 - Set-up Amazon API Gateway 19:05 - Test the ML architecture on AWS I hope this tutorial was useful for you. If need any help, or wanna to share your experience or suggest a topic for the next video, please drop a comment below! - Thank you! #sagemaker #lambdafunction #apigateway Slava Ukraina!
이게훨씬쉽너ㅏ
How to build ML Architecture with AWS SageMaker + Lambda + API Gateway | HANDS-ON TUTORIAL
This tutorial shows how to set-up a Machine Learning Architecture in Amazon Web Services by using combination of Amazon SageMaker, AWS Lambda Function, and Amazon API Gateway. The main idea is to build a workflow in cloud where a regular end user from public internet can make requests on pre-trained ML model and get a prediction (or AI-based insights) in a second back. From technical perspective, the backed works in such way: the the end use input his/her data and send it to API Gateway which uses REST API. Once the API service receive this input data, it forward it to pre-defined AWS Lambda function. Here, AWS Lambda function triggers the ML model endpoint which was created after the model training was completed and it's artifact saved in S3 bucket. Finally, the ML endpoint after received user input data, make a prediction using a pre-trained ML model and send back a predicted value in the same way through AWS Lambda to Amazon API Gateway. So, this video provides one of many ways how to deploy a Machine Learning model on the cloud using AWS. In this video, the usage of Amazon API Gateway is demonstrated either by using AWS Console and a custom Python script (where you can flexible leverage the API functionality). For demonstration purposes, in this video as an example I use breast cancer diagnosis prediction Machine Learning problem. The ML model endpoint was created specifically on this use case. You can find this notebook directly from AWS SageMaker Notebook templates. Documentation used in this tutorial, where you can find snippets for IAM role and AWS Lambda code in Python programming language used in this video: https://aws.amazon.com/blogs/machine-learning/call-an-amazon-sagemaker-model-endpoint-using-amazon-api-gateway-and-aws-lambda/ Read more related to this use case: - Amazon IAM: https://aws.amazon.com/iam/ - Amazon SageMaker: https://aws.amazon.com/pm/sagemaker/ - AWS Lambda Function: https://aws.amazon.com/lambda/ - Amazon API Gateway: https://aws.amazon.com/api-gateway/ - Also, I highly recommend to refresh you knowledge on IAM (Identity & Access Management), AWS Roles, Policies and Groups with this video: https://youtu.be/Ey9waqflzI4 The content of the tutorial: 0:00 - Explanation of ML architecture on AWS 2:15 - AWS Hand-on! Create AWS SageMaker Notebook Instance 4:49 - Explanation of Jupyter Notebook and train the ML model 8:17 - Build the SageMaker Endpoint for ML model 11:11 - Set-up AWS Lambda function 16:32 - Set-up Amazon API Gateway 19:05 - Test the ML architecture on AWS I hope this tutorial was useful for you. If need any help, or wanna to share your experience or suggest a topic for the next video, please drop a comment below! - Thank you! #sagemaker #lambdafunction #apigateway Slava Ukraina!
4.
한술 더
모니터링
지속적 개선
이런 작업들 전체를 MLOps라고 부른다.
5.
마무리
배운 내용 다시 정리
“MLOps = 머신러닝 운영”이 아니라 데이터 중심적 문제해결을 가속화하는 철학이자 도구이다. 하지만 처음에는 ‘데이터, 모델, 소스코드 사이의 관계를 이해하는 일 또는 그 관계를 명료하게 해 주는 도구로 받아들여 보자.
<실전 MLOps 가이드> 내용 인용
automl
테슬라의 AI 수석이었던 안드레 카파시가 했던 말
인용
테슬라의 데이터 드리븐 접근