Implementation and Operation Flashcards

1
Q

ML model deployment sections

A
  • interoperation with containers
  • accelerating ML systems using Elastic Inference
  • push model to edge using SageMaker Neo
  • Security: IAM, VPC, KMS
  • Right Instance Type
  • A/B test in production environment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where are the models in SageMaker hosted?

A

in Docker containers registered in ECS

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

How to distribute Tensorflow across multiple machines?

A

using a framework called

Horovod or Parameter Servers

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

How to make containers compatible with SageMaker?

A

there is a library for that

run pip install sagemaker-containers

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

How is the structure of a training container?

A

/opt/ml

  • input
  • model
  • code
  • output

input/config:
hyperparameters.json
resourceConfig.json

input/data:
/

code:
python or any other code that does the training should be here

output:
output goes here

output/failure:
failures goes here

model:
inference codes are here

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

SageMaker on the edge

A

SageMaker Neo

ARM, Intel, Nvidia processors

avoid few hundred milliseconds of latency

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

Codes that Neo compile

A
Tensorflow
MXNet
PyTorch
ONNX
XGBoost
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Neo comes with Compiler or Runtime?

A

comes with both

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

How to pair Neo with IoT Greengrass?

A

take a Ne-compiled model and deploy to an https endpoint

  • hosted on C5, M5, M4, P3, P2
  • should be the same instance type used for compilation

in pairing with IoT Greengrass:

  • train model on the cloud
  • compile with Neo
  • deploy to actual edge devices using IoT Greengrass

Greengrass uses Lambda functions

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

Security in SageMaker

A

uses:

  • IAM
  • MFA
  • SSL/TLS
  • CloudTrail
  • Encryption

be careful with PII

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

How to keep data protected at rest in SageMaker

A

KMS

  • jobs
  • notebooks

anything under
/opt/ml
and /tmp
can be encrypted using KMS

Securing Training Data

  • S3 encryptions
  • also KMS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Can you encrypt inter-node communications?

A

yes you can
it can increase the time and dollar with DL

also known as inter-container traffic encryption

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

VPC with SageMaker

A

yes possible
also possible to cut internet from notebook

then need to set up vpc endpoint for s3

notebooks, training/inference containers are internet-enabled by default

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

SageMaker logging and monitoring

A

CloudWatch can log, monitor and alarm on:

  • invocation and latency of endpoints
  • health of instance nodes
  • Ground Truth (how much active workers are doing?)

CloudTrail records actions from users, roles, and services within SageMaker
- log files delivered to S3 for auditing

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

SageMaker with spot instances, does that work?

A

it could be interrupted but you can use S3 checkpointing to pick up where you left off

it also can increase time

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

Elastic Inference

A

to accelerates deep learning inferences

cheaper than a GPU instance

17
Q

How to do EI?

A

deploy the model into a CPU with a EI

e.g. ml.eia1.large

18
Q

can you do EI with notebooks?

A

yes you can

19
Q

Where EI function?

A

where it is deep learning things
pre-build TF or MXNet containers

image classification
object detection

20
Q

Can you do AS for inferences ?

A

yes you can

21
Q

SageMaker and AZ?

A

SageMaker distribute across multiple AZ for better resiliency

VPC with min 2 subnets 1/AZ