-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdsf_2019.tex
510 lines (476 loc) · 14.6 KB
/
dsf_2019.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
\documentclass[12pt,aspectratio=169]{beamer}
\usetheme[
sectionpage=progressbar,
subsectionpage=progressbar,
progressbar=frametitle
]{metropolis}
\definecolor{blue-grey-900}{HTML}{263238}
\definecolor{deep-orange-500}{HTML}{FF5722}
\setbeamercolor{normal text}{fg=blue-grey-900, bg=white}
\setbeamercolor{alerted text}{fg=deep-orange-500}
\usepackage{graphicx}
\usepackage{hyphenat}
\usepackage[normalem]{ulem}
\usepackage{polyglossia}
\setdefaultlanguage[variant=british]{english}
\usepackage[english=british]{csquotes}
\usepackage{fontspec}
\setmainfont{Lucida Sans OT}
\setsansfont[Scale=MatchLowercase]{Lucida Sans OT}
\setmonofont[Scale=MatchLowercase]{Lucida Console DK}
\defaultfontfeatures{Ligatures=TeX}
\title{MLOps: are we there yet?}
\author{Gianluca Campanella}
\date{13\textsuperscript{th} April 2019}
\begin{document}
\maketitle
\begin{frame}{Hello!}
\begin{center}
\LARGE%
My name is \textbf{Gianluca}
{\fontspec{Gentium}\textcolor{gray}{[dʒanˈluːka]}}
\end{center}
\end{frame}
\begin{frame}{What I do nowadays}
\LARGE%
\only<1>{%
\begin{center}
I'm a Data Scientist at \\[\bigskipamount]
\includegraphics[height=2.5em]{figures/microsoft} \\[\medskipamount]
in \textbf{AzureCAT}
\end{center}}
\only<2>{%
\begin{center}
I also run my own company \\[\bigskipamount]
\raisebox{-0.5\height}{\includegraphics[height=2.5em]{figures/estimand}}
\raisebox{-0.5\height}{\huge Estimand} \\[\medskipamount]
that provides \\
\textbf{Data Science consulting and training}
\end{center}}
\end{frame}
\begin{frame}
\begin{center}
\LARGE%
Who's in the room?
\end{center}
\end{frame}
\begin{frame}{Today we're talking about\ldots}
\begin{center}
{\Huge%
MLOps}
\vfill\pause
($\approx$ a whole bunch of mistakes I made in the last few years)
\end{center}
\end{frame}
\begin{frame}{Two types of Data Science}
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{center}
\large\bf%
Analysis\hyp{}focused
\end{center}
\begin{itemize}
\item Maths and Statistics
\item Business Intelligence
\item[$\to$] Assist human decision\hyp{}making
\end{itemize}
\end{column}
\begin{column}{0.5\textwidth}
\begin{center}
\large\bf%
Building\hyp{}focused
\end{center}
\begin{itemize}
\item Machine Learning
\item Software Engineering
\item[$\to$] Develop and deploy data\hyp{}driven products
\end{itemize}
\end{column}
\end{columns}
\end{frame}
\begin{frame}{Things I've helped build recently}
\begin{itemize}
\setlength{\itemsep}{\bigskipamount}%
\item High\hyp{}frequency trading system for sports betting
\item Context\hyp{}aware, personalised search engine
\item Content recommender for a mobile app
\item Automated forecasting tool for an e\hyp{}commerce business
\end{itemize}
\end{frame}
\begin{frame}{DevOps}
\only<1>{%
\begin{block}{What?}
Automation practices between software developers and IT
\end{block}
\vfill
\begin{block}{Why?}
To build, test and release software faster and more reliably
\end{block}}
\only<2>{%
\begin{quote}
At its essence, DevOps is a culture, a movement, a philosophy.
\begin{flushright}
--- Atlassian
\end{flushright}
\end{quote}}
\end{frame}
\begin{frame}{MLOps}
\only<1>{%
\begin{block}{What?}
Automation practices between \alert{data scientists},
\alert{data engineers}, software developers and IT
\end{block}
\vfill
\begin{block}{Why?}
To build, test, release and \alert{monitor} software that
\alert{embeds ML} faster and more reliably
\end{block}}
\only<2>{%
\Large%
\begin{center}
High\hyp{}risk, high\hyp{}reward innovation culture
\vfill
$\downarrow$
\vfill
Iterate quickly $\ \longleftrightarrow\ $ Fail fast
\end{center}}
\end{frame}
\begin{frame}{Why does this matter?}
\only<1>{%
\begin{center}
{\Large%
If it's not used in production\ldots}
\vfill
{\LARGE\bf%
It never happened!}
\end{center}}
\only<2>{%
\begin{center}
{\Large%
If \emph{it is} used in production\ldots}
\vfill
{\LARGE\bf%
It better work!}
\end{center}}
\only<3>{%
\begin{block}{As a Data Scientist, MLOps\ldots}
\begin{itemize}
\item Is hard but does pay off
\item Gives you peace of mind
\item Allows you to focus on more interesting tasks
\end{itemize}
\end{block}}
\only<4>{%
\begin{block}{As a Software Engineer, MLOps\ldots}
\begin{itemize}
\item Is something you're probably already doing
\item Increases the dependability of ML systems
\item Brings you closer to the Data Science team
\end{itemize}
\end{block}}
\end{frame}
\begin{frame}{Don't try to run before you can walk}
\begin{center}
\includegraphics[height=0.8\textheight]{figures/ai_hierarchy} \\
{\scriptsize%
From M.\ Rogati}
\end{center}
\end{frame}
\begin{frame}{Where are we in the DS workflow?}
\only<1>{%
\begin{center}
\large%
Research question
\vfill
$\downarrow$
\vfill
Obtain $\ \longleftrightarrow\ $ Explore $\ \longleftrightarrow\ $ Model
\vfill
$\downarrow$
\vfill
Operationalise
\end{center}}
\only<2>{%
\begin{center}
\large%
Research question
\vfill
$\downarrow$
\vfill
Obtain $\ \longleftrightarrow\ $ Explore $\ \longleftrightarrow\ $ Model
\vfill
$\downarrow$
\vfill
\alert{Operationalise}
\end{center}}
\only<3>{%
\begin{center}
\large%
Research question
\vfill
$\downarrow$
\vfill
\alert{Obtain} $\ \longleftrightarrow\ $ Explore $\ \longleftrightarrow\ $ \alert{Model}
\vfill
$\downarrow$
\vfill
\alert{Operationalise}
\end{center}}
\only<4>{%
\begin{center}
\large%
Data sources
\vfill
$\downarrow$
\vfill
ETL $\ \longleftrightarrow\ $ Model development $\ \longleftrightarrow\ $ Training
\vfill
$\downarrow$
\vfill
Deployment
\end{center}}
\only<5>{%
\begin{center}
\large%
Data sources
\vfill
$\downarrow$
\vfill
\alert{ETL} $\ \longleftrightarrow\ $ Model development $\ \longleftrightarrow\ $ \alert{Training}
\vfill
$\downarrow$
\vfill
\alert{Deployment}
\end{center}}
\end{frame}
\begin{frame}{ETL}
\only<1>{%
\begin{block}{What?}
\begin{itemize}
\item Extract, transform, load
\item Data Science alchemy
\item Heavily informed by exploratory data analysis (EDA)
\end{itemize}
\end{block}}
\only<2>{%
\begin{block}{Things to keep in mind}
\begin{itemize}
\item Distributional assumptions
\item Transformations
\item External data sources
\end{itemize}
\end{block}}
\end{frame}
\begin{frame}{Model development}
\only<1>{%
\begin{block}{How?}
\begin{itemize}
\item Hyperparameter tuning
\item Automated ML
\end{itemize}
\end{block}}
\only<2>{%
\begin{block}{Things to keep in mind}
\begin{itemize}
\item Choice of programming language
\item Versioning
\item Performance tracking
\end{itemize}
\end{block}}
\only<3>{%
\centering%
\includegraphics[width=\textwidth]{figures/aml_run_details}}
\end{frame}
\begin{frame}{\textit{Interlude}}
\only<1>{%
\begin{block}{Online vs offline metrics}
\begin{itemize}
\item Business metrics $\to$ online metrics
\item Offline metrics $\approx$ online metrics
\item Experiment early and often
\end{itemize}
\end{block}}
\only<2>{%
\begin{block}{Feedback loops}
\begin{itemize}
\item Models become self\hyp{}fulfilling prophecies
\item Biased data collection
\item Don't just exploit, explore
\end{itemize}
\end{block}}
\end{frame}
\begin{frame}{Training vs scoring}
\begin{block}{Training}
\begin{itemize}
\item Historical data $\to$ model
\item Scheduled offline (batch) jobs
\end{itemize}
\end{block}
\vfill\pause
\begin{block}{Scoring}
\begin{itemize}
\item Model + new data $\to$ predictions
\item Online or offline (batch)
\end{itemize}
\end{block}
\end{frame}
\begin{frame}{Deployment}
\only<1>{%
\begin{block}{How?}
\begin{itemize}
\item Offline (batch) scoring
\item Queues
\item RPC (e.g.\ REST endpoint)
\item In\hyp{}process
\end{itemize}
\end{block}}
\only<2>{%
\begin{block}{Things to keep in mind}
\begin{itemize}
\item Throughput and latency requirements
\item Impedance mismatch between training and scoring%
\textsuperscript{$\star$}
\item Access control and security
\item Other moving parts (e.g.\ databases)
\end{itemize}
\end{block}
{\tiny%
\textsuperscript{$\star$} I'm looking at you, Apache Spark}}
\end{frame}
\begin{frame}{Online deployment}
\only<1>{%
\begin{block}{How?}
\begin{itemize}
\item Docker
\item Kubernetes
\item CI/CD pipeline
\end{itemize}
\end{block}}
\only<2>{%
\begin{block}{Things to keep in mind}
\begin{itemize}
\item Splitting traffic
\item A/B testing
\item Incremental roll\hyp{}out
\end{itemize}
\end{block}}
\end{frame}
\begin{frame}
\only<1>{%
\begin{center}
\large%
Data sources
\vfill
$\downarrow$
\vfill
\alert{ETL} $\ \longleftrightarrow\ $ \alert{Model development} $\ \longleftrightarrow\ $ \alert{Training}
\vfill
$\downarrow$
\vfill
\alert{Deployment}
\end{center}}
\only<2>{%
\begin{center}
\LARGE%
So\ldots~we're done?
\end{center}}
\only<3>{%
\begin{center}
{\LARGE%
Not quite!}
\vfill
We still need to \alert{automate} ETL and training
\end{center}}
\end{frame}
\begin{frame}{Retraining}
\begin{block}{Things to keep in mind}
\begin{itemize}
\item Distributional assumptions
\item Data drift
\item Performance tracking
\item Golden set
\end{itemize}
\end{block}
\end{frame}
\begin{frame}{Monitoring}
\only<1>{%
\begin{itemize}
\item Logging
\begin{itemize}
\item Distributional assumptions
\item Data drift
\item Statistical performance
\item Serving performance
\end{itemize}
\item Anomaly detection and alerting
\item Fallback mechanisms
\end{itemize}}
\only<2>{%
\centering%
\includegraphics[width=\textwidth]{figures/app_insights_dashboard}}
\end{frame}
\begin{frame}
\only<1>{%
\begin{center}
\LARGE%
Now we're really done!
\end{center}}
\only<2>{%
\begin{center}
\LARGE%
But then\ldots
\end{center}}
\end{frame}
\begin{frame}{Do it again!}
\begin{itemize}
\item Versioning
\item Roll\hyp{}back mechanisms
\item Experimentation
\item Bandits
\end{itemize}
\end{frame}
\begin{frame}{Recap}
\only<1>{%
\begin{center}
\large%
Data sources
\vfill
$\downarrow$
\vfill
ETL $\ \longleftrightarrow\ $ Model development $\ \longleftrightarrow\ $ (Re)training
\vfill
$\updownarrow$
\vfill
Experimentation $\ \longleftrightarrow\ $ Deployment $\ \longleftrightarrow\ $ Monitoring
\end{center}}
\only<2>{%
\begin{block}{As a Data Scientist\ldots}
\begin{itemize}
\item Familiarise yourself with the tools
\item Try moving some of your workloads away from your laptop
\item Understand where Engineering is coming from
\end{itemize}
\end{block}}
\only<3>{%
\begin{block}{As a Software Engineer\ldots}
\begin{itemize}
\item Ramp up on containers and orchestration
\item Check out the different cloud offerings
\item Help your fellow Data Scientists
\end{itemize}
\end{block}}
\end{frame}
\begin{frame}
\begin{center}
{\LARGE%
Thank you!}
\vfill
If you want to keep in touch\ldots \\[\medskipamount]
\includegraphics[height=1ex]{figures/mail}~gianluca@campanella.org
\hspace{1em}
\includegraphics[height=1ex]{figures/github}~gcampanella
\hspace{1em}
\includegraphics[height=1ex]{figures/linkedin}~gcampanella
\end{center}
\end{frame}
\end{document}