Interview reference
Canonical end-to-end project
One project gives you a stable story for interviews and learning.
raw data + source + configuration
operated, governed model service with reproducible lineage
I can explain SageMaker end to end using one concrete use case and then show how PyTorch or Hugging Face changes mainly the model/framework layer.
Mental model
What this means before worrying about syntax.
Use bank complaint classification as the anchor project and map every SageMaker concept onto it.
- The lifecycle is a chain of explicit contracts from data to production behavior.
- One canonical use case is the best memory anchor for the platform.
- Framework can change while lifecycle responsibilities remain stable.
S3 complaints -> processing -> TF-IDF/logistic regression training -> evaluate -> register -> ModelBuilder -> endpoint -> monitor
Implementation anatomy
The sequence you would actually build or configure.
- 1
Version raw complaint data.
- 2
Process/quality-check/split.
- 3
Train with ModelTrainer + named inputs.
- 4
Package preprocessing + estimator.
- 5
Evaluate and create metrics artifact.
- 6
Register approved candidate.
- 7
Build/deploy with ModelBuilder.
- 8
Invoke via stable request/response contract.
- 9
Monitor service/data/quality.
- 10
Retrain through governed pipeline.
Concrete example
A real model-development or production flow.
Request = complaint_id + complaint_text
Response = predicted_category + probability + model_version
Policy = probability >= .75 auto-route else manual review
Offline metric = macro F1
Online business metrics = coverage + auto-route error
Operational metric = endpoint p95 latency
Implementation lab
Concrete code, data manipulation and configuration for this lifecycle step.
Project directory that mirrors the lifecycle
complaint_model/
├── src/
│ ├── preprocess.py
│ ├── train.py
│ ├── evaluate.py
│ └── inference.py
├── tests/
│ ├── test_preprocess.py
│ ├── test_inference_schema.py
│ └── test_model_load.py
├── config/
│ ├── dev.yaml
│ └── prod.yaml
├── pipelines/
│ └── model_pipeline.py
├── requirements.txt
└── README.md
End-to-end data contracts
RAW_S3
-> preprocess.py
-> TRAIN_S3 / VALIDATION_S3 / TEST_S3
TRAIN_S3 + VALIDATION_S3
-> ModelTrainer(train.py)
-> MODEL_ARTIFACT_S3
MODEL_ARTIFACT_S3 + TEST_S3
-> evaluate.py
-> EVALUATION_JSON
MODEL_ARTIFACT_S3 + EVALUATION_JSON
-> Model Registry
-> approved model package
approved model package
-> ModelBuilder
-> Endpoint
Endpoint logs + delayed labels
-> monitoring
-> governed retraining trigger
Minimal inference contract
REQUEST = {
"complaint_id": "C-10029",
"text": "My account shows a debit I never made"
}
RESPONSE = {
"predicted_category": "Fraud_Unauthorized_Transaction",
"probability": 0.91,
"model_version": "17",
"auto_route": True,
}
Design decisions that matter
- Keep business routing rule independently changeable from model score where possible.
- Promote a more complex model only if quality gain justifies latency/cost/operability.
Common failure modes
- Notebook success is not production readiness.
- Preprocessing/label mapping must be consistent end to end.
- Every version needs enough data/code/image metadata to reproduce it.
Production readiness check
Items to close before treating this step as production-ready.