Machine Learning Architecture Cheat Sheet

Thangarajan Nagarethinam
2 min readNov 14, 2022

List out the cheat sheet and concepts for design machine learning architecture.

Machine Learning Project Life Cycle:

✅ Initiate
✅ Business goal identification
✅ ML problem framing
✅ Analysis
✅ Design
✅ Data processing
│ ├──data collection
│ ├──data preprocessing
│ ├──feature engineering
✅ Model Development
│ ├──Training
│ ├──Tuning
│ ├──Evaluation
✅ Model Deployment
✅ Testing
│ ├──Unit Testing
│ ├──Functional Testing
✅ UAT
✅ Deployment
│ ├──Inference
✅ Production
│ ├──Pre Production
│ ├──Post Production
✅ Model monitoring
✅ Ops Team Transition
✅ Documentation
✅ Cost

List of team and resources will be involved during machine learning architecture

👨‍🏫 Business Stakeholder
👨‍🏫 Solution architect
👨‍🏫 Project lead & Project manager
👨‍🏫 Data Engineer
👨‍🏫 Data Scientist
👨‍🏫 Machine Learning Engineer
👨‍🏫 Tester
👨‍🏫 Application & Visualization Developer

List out the design attributes of machine learning architectures

📌 Modularity
📌 Reproducibility
📌 Scalability
📌 Extensibility
📌 Testing
📌 Automation
📌 Reliability
📌 Performance
📌 Security
📌 Portability
📌 Resiliency
📌 Reusability
📌 Cost
📌 Continuous Improvement

Consider below factor when you collect requirements

  1. High level requirements
  2. Low level requirements
  3. Specifications
  4. Assumptions
  5. Constraints
  6. Acceptance criteria
  7. Fault tolerance
  8. Risk
  9. Mitigation Plan
  10. SLA & KPI

Consider the below factors when you build machine learning solutions

◉ ROI
◉ Human Resources
◉ Time
◉ Operations & Maintenance
◉ Cost
◉ Incentive

Development Habits for Increasing Cloud Training Productivity

  1. Development Habits for Increasing Cloud Training Productivity
  2. Adapt your debugging tools and techniques to cloud training
  3. Conduct continuous, in-depth, performance analysis and optimizations
  4. Introduce fault tolerance into your code
  5. Perform automated monitoring of your training jobs
  6. Adapt advanced hyperparameter tuning techniques

Machine learning design trade-off attributes

🔨 Bias vs Variance
🔨 Model Accuracy vs Model Performance
🔨 Latency vs Throughput
🔨 Latency vs Accuracy
🔨 Interpretability vs Explainability
🔨 Interpretability vs Accuracy
🔨 Explainability vs Complexity

Machine Learning Design Patterns

Serving patterns
└──Web single pattern
└──Synchronous pattern
└──Asynchronous pattern
└──Batch pattern
└──Prep=pred pattern
└──Microservice vertical pattern
└──Microservice horizontal pattern
└──Prediction cache pattern
└──Data cache pattern
└──Prediction circuit break pattern
└──Multiple stage prediction pattern
└──Serving template pattern

QA patterns
└──Shadow AB=testing pattern
└──online AB=testing pattern
└──Loading test pattern

Training patterns
└──Batch training pattern
└──Pipeline training pattern
└──Parameter and architecture search pattern
└──Antipatterns
└──└──Only-me pattern
└──└──Training code in serving pattern
└──└──many pipes pattern

Operation patterns
└──Model-in-image pattern
└──Model-load pattern
└──Data model versioning pattern
└──Prediction log pattern
└──Prediction monitoring pattern
└──Parameter-based serving pattern
└──Condition-based-serving pattern
└──Antipatterns
└──└──No logging pattern
└──└──Nobody knows pattern

Lifecycle patterns
└──Train-then-serve pattern
└──Training-to-serving pattern

Well-Architected Framework pillars

1️⃣ Operational Excellence
2️⃣ Security
3️⃣ Reliability
4️⃣ Performance Efficiency
5️⃣ Cost Optimization

--

--