• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 13 páginas
Examen

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

Document preview thumbnail
Vista previa 2 fuera de 13 páginas

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

Vista previa del contenido

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

Información del documento

Subido en
2 de noviembre de 2026
Número de páginas
13
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$16.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
GradeAchiver
3.5
(11)
Vendido
68
Seguidores
3
Artículos
7841
Última venta
2 días hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes