機械学習システムのデプロイパターン Aki Ariga | Field Data Scientist
2© Cloudera, Inc. All rights reserved.
• (Twitter/Github @chezou)
• Field Data Scientist @ Cloudera
•
• NLP/ /
• Rails
•
•
4© Cloudera, Inc. All rights reserved. 4
Artificial Intelligence( )
Machine Learning
by Splintax CC BY-SA 3.0https://commons.wikimedia.org/wiki/File:IF-THEN-ELSE-END_flowchart.png
Deep Learning
Good to read: https://blogs.nvidia.com/blog/2016/07/29/whats-difference-artificial-intelligence-machine-learning-deep-learning-ai/
5© Cloudera, Inc. All rights reserved.
●
○ e.g.) , ●
○ e.g.) ●
○ e.g.) ●
○ e.g.) ●
○ e.g.) Amazon, Netflix●
○
e.g.) Alpha-Go, ● etc…
7© Cloudera, Inc. All rights reserved.
[0, 1, 0, 2.5, 0, -1, ...][1, 0.5, 0.1, -2, 3, 2, ...][1, 0, 1.0, 1.1, 0, 0, ...]
Logistic Regression,SVM, Random Forest, NN...
w1=1, w2=-1, w3=0 ...
)
8© Cloudera, Inc. All rights reserved.
From data to exploration to action
Data Engineering Data Science (Exploratory) Production (Operational)
Data Models Business ValuePredictions
13© Cloudera, Inc. All rights reserved.
Web
DB
/
API
RESTAPI
User ID/Item ID
Microservices architecture: Web ML REST (or gRPC) APIML
ML
17© Cloudera, Inc. All rights reserved.
& /
&
PMMLexport
Model building layerPredicting & serving layer
CDSW
HDFS
18© Cloudera, Inc. All rights reserved.
&/
&
Model building layerPredicting & serving layer
HDFS
Dockerimage
CDSW
19© Cloudera, Inc. All rights reserved.
Demo:
https://github.com/chezou/cdsw-serve-docker
20© Cloudera, Inc. All rights reserved.
CDSW
Amazon ECS
Application Load Balancer
AmazonS3
Docker HUBDockerimage
Source code
Trained model
Predictionrequest
21© Cloudera, Inc. All rights reserved.
Cloudera Data Science Workbench(CDSW)エンタープライズのためのセルフサービスデータサイエンス基盤
- GPU
-fork
- Docker
- Spark
-
27© Cloudera, Inc. All rights reserved.
Kudu/HBase
/
&
Model building & predicting layerServing layer
HDFS
CDSW
33© Cloudera, Inc. All rights reserved.
&/
&
/export
Model building layerPredicting & serving layer
HDFS
CDSW
35© Cloudera, Inc. All rights reserved.
●
○ CDSW Job
●
○ NA ( )
●
○ 1■ PMML export OpenScoring API■ API Docker■ API
○ 2■ CDSW HBase/Kudu/RDB
○ 3■
○ 4■ TensorFlow export/CoreML