WGU D602 | Deployment | Task 2
WGU D602 – Deployment
Task 2: Data Production Pipeline Deployment
Flight Delay Prediction Using Python, MLflow, GitLab, and MLproject
2026/2027 Updated | Comprehensive Worked Exemplar
Project overview
This project develops a reproducible machine-learning pipeline that processes airline flight data,
prepares a modeling dataset, trains and evaluates polynomial regression models, and records
experiments through MLflow.
The selected analysis location is Hartsfield–Jackson Atlanta International Airport (ATL). The
project uses flight data from the Bureau of Transportation Statistics (BTS), consistent with the uploaded
Task 2 report.
The solution follows the seven sections shown in that document:
Section Deliverable
A GitLab Repository
B Import and Format Script
C Data Cleaning Script
D MLflow Experiment
E MLproject Linking File
F Explanation of Code and Pipeline
G Sources
Important alignment note: The uploaded PDF supplies written explanations for Sections A–G but
does not contain the actual Python scripts, original poly_regressor template, course-provided
dataset, GitLab repository, or official grading rubric. The implementation below is an original,
reproducible reference solution based on the document—not a claim that the missing files have
been verified or that the work has passed WGU evaluation.
A. GitLab Repository
A1. Repository development and configuration
The proposed repository provides centralized version control for the flight-delay prediction pipeline.
GitLab maintains the Python scripts, MLflow project configuration, environment definitions, supporting
documentation, and evidence of the software-development process.
The primary purpose of the repository is to enable other analysts and business units to reproduce the
data-processing and model-training workflow while preserving a traceable record of changes.
The repository should be named:
D602-Flight-Delay-Prediction-Pipeline
Its organization separates raw data, processed data, program logic, machine-learning experiments, and
technical documentation.
D602 TASK 2 • Comprehensive Worked Exemplar | Page 1
, WGU D602 | Deployment | Task 2
A2. Repository directory structure
D602-Flight-Delay-Prediction-Pipeline/
│
├── data/
│ ├── raw/
│ │ └── flights.csv
│ └── processed/
│ ├── imported_data.csv
│ └── cleaned_data.csv
│
├── reports/
│ ├── cleaning_report.json
│ ├── model_comparison.csv
│ └── model_summary.json
│
├── import_data_v1.py
├── import_data_v2.py
├── clean_data_v1.py
├── clean_data_v2.py
├── mlflow_experiment_v1.py
├── mlflow_experiment_v2.py
├── pipeline.py
│
├── MLproject
├── pipeline_env.yaml
├── requirements.txt
├── README.md
└── .gitignore
A3. Version-control requirements
The project should maintain meaningful commits for each development phase. Version 1 scripts
demonstrate the initial working implementations, while Version 2 scripts introduce improved validation,
error handling, logging, and modeling functionality.
An appropriate development sequence is:
Commit Description
1 Initialize the D602 project structure
2 Add initial flight-data import functionality
Improve import validation and temporal
3
feature engineering
4 Implement initial ATL flight-data cleaning
Enhance missing-value handling and data-
5
quality reporting
6 Add initial polynomial regression experiment
Implement MLflow model comparison and
7
artifact logging
Configure MLproject and execution
8
environment
9 Document pipeline execution and validation
These are proposed commit messages, not a fabricated record of completed work.
A4. GitLab setup commands
git init
git branch -M main
git add .
git commit -m "Initialize D602 flight delay project"
git remote add origin <YOUR_GITLAB_REPOSITORY_URL>
git push -u origin main
Replace the repository placeholder with the actual GitLab project URL.
D602 TASK 2 • Comprehensive Worked Exemplar | Page 2
, WGU D602 | Deployment | Task 2
The repository should also use a .gitignore file to prevent temporary files, local credentials, and
generated MLflow artifacts from being unnecessarily committed.
A5. Repository evidence
The final submission should reference the actual GitLab repository and provide evidence of meaningful
development progression, including the commit history, required project files, and successful pipeline
execution.
The GitLab URL, dated commits, and screenshots must be collected from the real implementation.
Section A conclusion: The proposed repository establishes a traceable and maintainable foundation
for managing the flight-delay prediction workflow. Once populated and pushed to GitLab, it will allow
analysts to inspect the source code, reproduce processing steps, and review successive improvements.
B. Import and Format Script
B1. Purpose of the data-import process
The data-import component establishes the first operational stage of the flight-delay prediction
pipeline. Its purpose is to import raw airline data, standardize the structure of the dataset, validate
required fields, and generate an intermediate CSV file suitable for cleaning and model development.
The source dataset is based on the Bureau of Transportation Statistics Reporting Carrier On-Time
Performance database, which includes flight schedules, departure and arrival performance, airport
identifiers, distance, cancellations, and diversion information. Bureau of Transportation Statistics—
Airline On-Time Data.
The import process is divided into two versions to demonstrate progressive development.
B2. Initial import script – Version 1
The first implementation, import_data_v1.py, establishes the foundational import functionality.
The script reads the raw CSV file using Python's Pandas library and identifies the columns required for
predicting departure delays. These include the flight date, origin airport, departure delay, scheduled
departure time, and distance.
The initial implementation performs basic validation to ensure the expected columns exist. It converts
flight dates into a recognized date format, standardizes airport identifiers, and writes the imported data
to imported_data.csv.
The implementation also checks for missing source files and raises an error when the input structure is
incompatible with the expected data schema.
This version demonstrates that the source information can be imported and prepared for subsequent
processing without requiring manual spreadsheet manipulation.
B3. Enhanced import script – Version 2
The enhanced implementation, import_data_v2.py, adds improved data validation, flexible column
mapping, and feature engineering.
The script accommodates alternate BTS column naming conventions. For example, a source field
named FlightDate can be standardized to FL_DATE, while DepDelay is standardized to
DEP_DELAY.
D602 TASK 2 • Comprehensive Worked Exemplar | Page 3
WGU D602 – Deployment
Task 2: Data Production Pipeline Deployment
Flight Delay Prediction Using Python, MLflow, GitLab, and MLproject
2026/2027 Updated | Comprehensive Worked Exemplar
Project overview
This project develops a reproducible machine-learning pipeline that processes airline flight data,
prepares a modeling dataset, trains and evaluates polynomial regression models, and records
experiments through MLflow.
The selected analysis location is Hartsfield–Jackson Atlanta International Airport (ATL). The
project uses flight data from the Bureau of Transportation Statistics (BTS), consistent with the uploaded
Task 2 report.
The solution follows the seven sections shown in that document:
Section Deliverable
A GitLab Repository
B Import and Format Script
C Data Cleaning Script
D MLflow Experiment
E MLproject Linking File
F Explanation of Code and Pipeline
G Sources
Important alignment note: The uploaded PDF supplies written explanations for Sections A–G but
does not contain the actual Python scripts, original poly_regressor template, course-provided
dataset, GitLab repository, or official grading rubric. The implementation below is an original,
reproducible reference solution based on the document—not a claim that the missing files have
been verified or that the work has passed WGU evaluation.
A. GitLab Repository
A1. Repository development and configuration
The proposed repository provides centralized version control for the flight-delay prediction pipeline.
GitLab maintains the Python scripts, MLflow project configuration, environment definitions, supporting
documentation, and evidence of the software-development process.
The primary purpose of the repository is to enable other analysts and business units to reproduce the
data-processing and model-training workflow while preserving a traceable record of changes.
The repository should be named:
D602-Flight-Delay-Prediction-Pipeline
Its organization separates raw data, processed data, program logic, machine-learning experiments, and
technical documentation.
D602 TASK 2 • Comprehensive Worked Exemplar | Page 1
, WGU D602 | Deployment | Task 2
A2. Repository directory structure
D602-Flight-Delay-Prediction-Pipeline/
│
├── data/
│ ├── raw/
│ │ └── flights.csv
│ └── processed/
│ ├── imported_data.csv
│ └── cleaned_data.csv
│
├── reports/
│ ├── cleaning_report.json
│ ├── model_comparison.csv
│ └── model_summary.json
│
├── import_data_v1.py
├── import_data_v2.py
├── clean_data_v1.py
├── clean_data_v2.py
├── mlflow_experiment_v1.py
├── mlflow_experiment_v2.py
├── pipeline.py
│
├── MLproject
├── pipeline_env.yaml
├── requirements.txt
├── README.md
└── .gitignore
A3. Version-control requirements
The project should maintain meaningful commits for each development phase. Version 1 scripts
demonstrate the initial working implementations, while Version 2 scripts introduce improved validation,
error handling, logging, and modeling functionality.
An appropriate development sequence is:
Commit Description
1 Initialize the D602 project structure
2 Add initial flight-data import functionality
Improve import validation and temporal
3
feature engineering
4 Implement initial ATL flight-data cleaning
Enhance missing-value handling and data-
5
quality reporting
6 Add initial polynomial regression experiment
Implement MLflow model comparison and
7
artifact logging
Configure MLproject and execution
8
environment
9 Document pipeline execution and validation
These are proposed commit messages, not a fabricated record of completed work.
A4. GitLab setup commands
git init
git branch -M main
git add .
git commit -m "Initialize D602 flight delay project"
git remote add origin <YOUR_GITLAB_REPOSITORY_URL>
git push -u origin main
Replace the repository placeholder with the actual GitLab project URL.
D602 TASK 2 • Comprehensive Worked Exemplar | Page 2
, WGU D602 | Deployment | Task 2
The repository should also use a .gitignore file to prevent temporary files, local credentials, and
generated MLflow artifacts from being unnecessarily committed.
A5. Repository evidence
The final submission should reference the actual GitLab repository and provide evidence of meaningful
development progression, including the commit history, required project files, and successful pipeline
execution.
The GitLab URL, dated commits, and screenshots must be collected from the real implementation.
Section A conclusion: The proposed repository establishes a traceable and maintainable foundation
for managing the flight-delay prediction workflow. Once populated and pushed to GitLab, it will allow
analysts to inspect the source code, reproduce processing steps, and review successive improvements.
B. Import and Format Script
B1. Purpose of the data-import process
The data-import component establishes the first operational stage of the flight-delay prediction
pipeline. Its purpose is to import raw airline data, standardize the structure of the dataset, validate
required fields, and generate an intermediate CSV file suitable for cleaning and model development.
The source dataset is based on the Bureau of Transportation Statistics Reporting Carrier On-Time
Performance database, which includes flight schedules, departure and arrival performance, airport
identifiers, distance, cancellations, and diversion information. Bureau of Transportation Statistics—
Airline On-Time Data.
The import process is divided into two versions to demonstrate progressive development.
B2. Initial import script – Version 1
The first implementation, import_data_v1.py, establishes the foundational import functionality.
The script reads the raw CSV file using Python's Pandas library and identifies the columns required for
predicting departure delays. These include the flight date, origin airport, departure delay, scheduled
departure time, and distance.
The initial implementation performs basic validation to ensure the expected columns exist. It converts
flight dates into a recognized date format, standardizes airport identifiers, and writes the imported data
to imported_data.csv.
The implementation also checks for missing source files and raises an error when the input structure is
incompatible with the expected data schema.
This version demonstrates that the source information can be imported and prepared for subsequent
processing without requiring manual spreadsheet manipulation.
B3. Enhanced import script – Version 2
The enhanced implementation, import_data_v2.py, adds improved data validation, flexible column
mapping, and feature engineering.
The script accommodates alternate BTS column naming conventions. For example, a source field
named FlightDate can be standardized to FL_DATE, while DepDelay is standardized to
DEP_DELAY.
D602 TASK 2 • Comprehensive Worked Exemplar | Page 3