🎓 University of America — Course Portal
AI EngineeringAIE101 › Week 1
⚙️ AI Engineering Week 1 of 14 ⏱ ~50 min BSc Year 1

Foundations of AI Engineering

The AI engineering landscape, roles, the complete model lifecycle, and the infrastructure that powers modern AI systems. By the end of this lecture, you'll understand what AI engineers actually build — and how they differ from data scientists and researchers.

AIE101 — Week 1: Foundations of AI Engineering
AI-Generated Lecture Video · University of America
0:00 / 50:00
🎬
AI-Generated Video Ready Script: ~3,600 words (~50 min). Generate with Synthesia/HeyGen. Voice narration: ElevenLabs. Slides available in lecture package.
🎯 Learning Objectives

After this lecture, you will be able to:

  1. Distinguish AI engineering from data science and AI research — and explain where each fits in an organization.
  2. Describe the complete machine learning lifecycle, from business requirement to production monitoring.
  3. Identify the core infrastructure components that power modern AI systems.
  4. Explain what MLOps means and why it exists.
  5. Set up a basic Python ML engineering environment with Docker, Git, and a model registry.
👷 1. What Is AI Engineering?

If a data scientist asks "what can the data tell us?", an AI engineer asks "how do we build something that delivers that insight reliably, at scale, to millions of users?" AI engineering is the discipline of designing, building, and operating AI-powered systems in production.

The Core DistinctionA data scientist trains a model in a Jupyter notebook. An AI engineer takes that model and turns it into a service that answers 10,000 requests per second, monitors itself for drift, retrains when accuracy drops, and pages someone at 3am if it breaks.

The Three Roles in AI

🔬

AI Researcher

Creates new algorithms and architectures. Publishes papers. Works at the frontier of what's possible. Tools: PyTorch, JAX, LaTeX.

📊

Data Scientist

Applies existing techniques to solve business problems. Builds models and analyses. Tools: scikit-learn, notebooks, dashboards.

⚙️

AI Engineer

Productionizes AI systems. Builds APIs, pipelines, monitoring, and infra. Tools: Docker, Kubernetes, MLflow, FastAPI, cloud platforms.

🔄 2. The Machine Learning System Lifecycle

Building a production ML system is far more than training a model. Researchers at Google famously noted that in real-world ML systems, the actual model code is a tiny fraction of the total codebase. The rest is infrastructure.

ML System Architecture
Raw Data Sources
Data Pipeline (ETL)
Feature Store
Model Training
Model Registry
Validation & Testing
CI/CD Pipeline
Serving / API
Monitoring
Drift Detection
Alerting
Retraining Trigger
⚠️ The 80/20 Rule of ML in Production: Getting a model to 80% accuracy takes 20% of the effort. Getting it to production, keeping it there, and maintaining it takes 80%. AI engineers are the ones who do that 80%.
🔧 3. What Is MLOps?

MLOps (Machine Learning Operations) is a set of practices that combine ML, DevOps, and data engineering to deploy and maintain ML models in production reliably and efficiently. It's modeled after DevOps in software engineering.

Core MLOps Practices

📦

Version Control

Track code, data, models, and experiments. Nothing is deployed without a version. Tools: Git, DVC, MLflow.

🔁

CI/CD for ML

Automated testing and deployment. Every model change triggers tests before it reaches production.

📊

Monitoring

Track model performance, data drift, and system health in real-time. Alert on degradation.

🔄

Retraining

Scheduled or triggered retraining pipelines. Fresh data → better model → automated re-deployment.

🧪

A/B Testing

Route traffic between model versions. Compare performance on live users before full rollout.

📝

Reproducibility

Any experiment from 6 months ago should be perfectly reproducible. Track every parameter and artifact.

💻 4. Your First MLOps Setup

Let's build a minimal but proper AI engineering environment. This is how production projects start.

# Step 1: Project structure (AI Engineering standard) # ├── data/ → raw & processed datasets # ├── notebooks/ → exploration only, never production # ├── src/ → production Python code # │ ├── features.py → feature engineering # │ ├── train.py → training pipeline # │ ├── evaluate.py → evaluation metrics # │ └── serve.py → serving/API code # ├── tests/ → unit and integration tests # ├── Dockerfile → containerization # └── requirements.txt # Step 2: Track an experiment with MLflow import mlflow import mlflow.sklearn from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import accuracy_score mlflow.set_experiment("aie101-week1-demo") with mlflow.start_run(): # Log parameters mlflow.log_param("n_estimators", 100) mlflow.log_param("max_depth", 5) # Train model model = RandomForestClassifier(n_estimators=100, max_depth=5) model.fit(X_train, y_train) # Evaluate & log metrics acc = accuracy_score(y_test, model.predict(X_test)) mlflow.log_metric("accuracy", acc) # Log the model artifact mlflow.sklearn.log_model(model, "random_forest_model") print(f"Run logged! Accuracy: {acc:.4f}")
🏃 Week 1 Practice: Install Docker, Python, and MLflow. Create the project structure above, train any sklearn classifier, and log the experiment with MLflow. View the MLflow UI at localhost:5000. This is your first step into AI Engineering.
📁 PROJECT 1 Weight: 50% of AIE101 Grade

Build Your First ML Pipeline

Set up a complete, production-style ML pipeline: data loading → feature engineering → model training → experiment tracking → model packaging. The pipeline must be reproducible from a single command.

Deliverables:
  • GitHub repository with proper project structure (see Week 1 code example).
  • A training pipeline script that runs end-to-end with a single command: python src/train.py
  • MLflow experiment tracking with at least 5 logged runs (different hyperparameters).
  • A Dockerfile that packages your model and serves it via a FastAPI endpoint.
  • A README.md explaining setup, architecture, and how to run the pipeline.
  • A brief write-up: "What would break if this system went to production for 1M users?"
Grading:
40%
Pipeline completeness & correctness
30%
Code quality & documentation
30%
Engineering judgment & write-up

📅 Due: 3 weeks from today · Submit GitHub link via portal · Late: -5%/day

📝 Midterm & Final Preview

Sample questions for AIE101 midterm (20%) and final (30%).

Midterm Q1 · Short Answer SA

Explain the difference between a data scientist and an AI engineer. Provide one example of a task each would own in a production ML project.

Midterm Q3 · Architecture Design Design

Draw the architecture of a production ML system for a recommendation engine. Label each component and describe its role. Include data flow arrows.

Final — Major Problem Engineering

You are given a Python script that trains a model in a notebook. Your task: convert it into a production-grade ML pipeline with MLflow tracking, a FastAPI serving endpoint, and a Dockerfile. You have 90 minutes and access to your notes and the internet.