• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 13 pages
Exam (elaborations)

WGU D602 Deployment – Task 3: Program Deployment | Flight Delay Prediction API Using Python, FastAPI & Docker | Complete Report 2026/2027 Update

Document preview thumbnail
Preview 2 out of 13 pages

WGU D602 Deployment – Task 3: Program Deployment | Flight Delay Prediction API Using Python, FastAPI & Docker | Complete Report 2026/2027 Update

Content preview

WGU D602 Deployment – Task 3: Program Deployment | Flight Delay Prediction
API Using Python, FastAPI & Docker | Complete Report 2026/2027 Update


1. For the WGU D602 Task 3 Flight Delay Prediction API, which FastAPI endpoint
design correctly handles real-time predictions with validation?




Figure 1: Refer to diagram for Q1 – FastAPI / Docker deployment flow

A) Define Pydantic model FlightRequest with fields airline str, origin str length 3,
dest str length 3, dep_delay float ge -60 le 600, weather str in [clear, rain, snow],
hour int 0-23, dayofweek int 0-6, endpoint @app.post('/predict') def
predict(request: FlightRequest) validates input, loads XGBoost model.pkl and
preprocessing pipeline, returns JSON {'delay_probability': 0.73,
'delay_prob_percent': '73%', 'prediction': 'Delayed'} with SHAP top features, plus
@app.get('/health') for liveness and /docs for Swagger
B) Use GET request with no validation and return raw model object
C) Use PCA to predict flight delay
D) Hardcode predictions without model

Answer: A
Rationale: Option A is correct because FastAPI with Pydantic provides
automatic validation: airline as string, origin/dest 3-letter airport codes,

, dep_delay bounded -60 to 600 minutes, weather in allowed set, hour 0-23,
dayofweek 0-6. The POST /predict endpoint loads the XGBoost model.pkl and
preprocessing pipeline, returns structured JSON with delay_probability 0.73
and percent, plus SHAP top features for explainability, while /health enables
Kubernetes liveness probes and /docs provides auto-generated Swagger UI.
Option B is wrong because GET with no validation allows invalid inputs like
hour 99, returns raw model object not JSON, lacks health check, and violates
REST best practices for predictions. Option C is wrong because PCA is
dimensionality reduction for analysis, not a model for flight delay prediction.
Option D is wrong because hardcoding predictions without a trained model
provides no ML value and fails to generalize to new flights.

2. Refer to the FastAPI Flight Delay API Architecture diagram below. How does a
client request flow through the system to return a prediction?




Figure 2: Refer to diagram for Q2 – FastAPI / Docker deployment flow

A) Client (Web App/Postman) sends REST/HTTPS POST to API Gateway which
handles rate limiting and load balancing, routes to Docker containerized FastAPI
App (Python 3.10) with endpoints /predict POST, /health GET, /docs GET
Swagger, FastAPI loads Model Layer XGBoost flight_delay_model.pkl and sklearn
preprocessing pipeline, Data Layer provides features departure_delay, airline,
origin, dest, weather, hour, dayofweek, returns Response JSON with

Document information

Uploaded on
November 2, 2026
Number of pages
13
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$16.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
GradeAchiver
3.5
(11)
Sold
68
Followers
3
Items
7841
Last sold
2 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions