Intro to ML Flashcards

1
Q

POC to Production Gap

A

Proof-of-concept to production

ML model code is 5-10% of ML project code

refer to [D. Sculley et all NIPS 2015: Hidden Technical Debt in Machine Learning System] diagram

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

ML project lifecycle

A

“SDMD”

scoping (X->Y) -> data -> modeling -> deployment

scoping:
* define project [X->Y]

Data:
* define data and establish baseline
* label and organize data

Modeling
* select and train model
* perform error analysis

Deployment
* deploy in production
* monitor & maintain system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Nuance between research/academia and production team’s refinement to ML model?

  • code (algorithm/model)
  • hyperparameters
  • data
A

research/academia:
tend to hold data the same
optimize code and hyperparameters

production team:
tend to hold code the same
optimize data and hyperparameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Edge devices [definition?]

A

Edge devices are pieces of equipment that serve to transmit data between the local network and the cloud.

They are able to translate between the protocols, or languages, used by local devices into the protocols used by the cloud where the data will be further processed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

MLOps stand for?

A

an emerging discipline, and comprises a set of tools and principles to support progress through the ML project lifecycle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Concept drift vs. data drift

A

data drift
[X changes]
e.g. a politician suddenly becomes famous

concept drift
[X -> Y] mapping changes
e.g. house size doesn’t change, but price change

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

realtime vs. Batch

A

speech -> realtime
hospital record from patient -> Batch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

cloud vs. Edge/Browser

A

edge/browser -> good to always have as well, in case internet is not accessible or shut down

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

checklist of things to consider to create ML software

A
  • realtime or Batcch
  • cloud vs Edge/Browser
  • computer resources (CPU/GPU/memory)
  • Latency, throughput (QPS)
  • Logging
  • security and privacy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

throughout (QPS)

A

Throughput(QPS) - queries per second: This is the number of requests that are successfully executed/serviced per unit of time. For example, if the throughput is 50/minute, this means that on your server, per minute, 50 requests are executed successfully (accepted, processed and responded properly)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Common ML deployment cases

A
  • New product/capability
  • automate/assist with manual task
  • replace previous ML system

Key ideas:
* Gradual ramp up with monitoring
* Rollback

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

rollback

A

if new model not work, go back to previous-working model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

gradual ramp up with monitory

A

not direct big travel to new model
start from a small traffic and then ramp up

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

shadow mode (deployment)

A

ML system shadows the human and runs in parallel.
ML system’s output not used for any decisions during this phase.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

canary deployment

A
  • roll out to small fraction (say 5%) of traffic initially
  • monitor system and ramp up traffic gradually

origin:
canary in a coal mine
which refers to how coal miners used to use canaries to spot if there’s a gas leak

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Blue green deployment

A

blue version = old version
green version = new version

router suddenly switch from old to new

benefit:
* easy way to enable rollback

17
Q

degrees of automation

A

human only -> shadow mode -> AI assistance -> partial automation (send to human if algorithm is not sure) -> full automation (only AI)

both AI assistance and partial automation are “human in the loop” deployments
common for factory

consumer software -> full automation is more necessary

18
Q

monitoring 思路

A
  • brainstorm the things that could go wrong
  • brainstorm a few statistics/metrics that will detect the problem
  • it is ok to use many metrics initially and gradually remove the ones you find not useful

e.g.
software metrics | memory, compute, latency, throughput, server load
Input metrics [x] | avg input length, avg input volume, num missing values, avg image brightness
output metrics [y] | # time return “” (null), # times user redoes search, #timer user switches to typing (give up on your speech system), CTR

19
Q

iterative process for ML model deployment

A

ML model iteration:
ML model/data ->experiment -> error analysis -> [go back]

deployment iteration:
deployment/monitoring -> traffic -> performance analysis -> [go back]

20
Q

techniques for monitoring

A

*set thresholds for alarms
*adapt metrics and thresholds over time

21
Q

VAD?

A

Voice activity detection