Requirements Rubric
This page lists each requirement from Project Requirements and says where the project meets it. Each heading quotes the assignment's own wording, in the assignment's order: the two Deliverables, Steps 1 to 9, and the Learning Goal on ethics and limitations. Each entry gives a status, the code that meets the requirement, the docs page that explains it, and the check that proves it.
Code links go to the repository on GitHub: https://github.com/jconnors23/510-m3-nfl-prediction-analytics. The assignment's other Learning Goals describe what the project teaches and are covered by the requirements below. The ethics goal asks for a specific piece of work in the project, so it is listed as a requirement of its own.
Summary
The assignment holds 48 requirements, counting the ethics reflection from its Learning Goals. All 48 are met. Each one is checked off below and links to its entry.
Deliverable 1: GitHub Repository
- All code for preprocessing, training, serving, and deployment
-
config.yamlfor pipeline configuration -
requirements.txtorenvironment.yaml - A Dockerfile that can run the full project
- How to train the model
- How to build and test the API locally
- How to deploy to the cloud
- MLFlow or Weights & Biases logging
- Use of branches and pull requests (each group member must submit at least one PR)
- A clear project structure and commit history
Deliverable 2: Front-End Application
- Be publicly accessible and linked in the README
- Send requests to your deployed model API (e.g., using requests or fetch)
- Display the model's predictions in an interactive, intuitive format
- Be built with Streamlit, Gradio, NextJS, or a custom web framework
Step 1: Choose a Dataset and Define the Problem
- Select a public dataset (e.g., Kaggle, UCI, HuggingFace Datasets).
- Define a supervised learning task (classification or regression).
- Identify your target variable and evaluation metric.
Step 2: Set Up Data Storage in the Cloud
- Clean and preprocess the dataset locally.
- Upload your cleaned data to a cloud storage service:
- Write a script to access and download the data programmatically in your pipeline.
Step 3: Build a Reproducible ML Pipeline
- Choose a simple model (e.g., logistic regression, random forest, XGBoost).
- Data ingestion (from the cloud)
- Preprocessing and feature engineering
- Train/validation/test split
- Model training and evaluation
- Control parameters via a
config.yamlfile (e.g., learning rate, split ratio, etc.).
- Track experiment runs, model parameters, and evaluation metrics.
- Log artifacts (trained model, plots, etc.) for version control and reproducibility.
Step 5: Containerize with Docker
- Installs all dependencies.
- Includes entry points for training and serving.
- Build and run your Docker image locally to test reproducibility.
Step 6: Serve Your Model as an API
- Load your trained model.
- Create a
/predictendpoint that accepts JSON input and returns a prediction. - Test your API locally using curl or Postman.
Step 7: Deploy the API to the Cloud
- Choose a cloud deployment platform:
- Package your API and deploy it so that the
/predictendpoint is publicly accessible. - Confirm your endpoint works using an HTTP request with test data.
Step 8: Build the Front-End Interface
- Create a lightweight UI using Streamlit, Gradio, or a simple web app.
- Collect user input, send it to the deployed API using requests or fetch, and display the prediction.
- Host your app on Hugging Face Spaces, Streamlit Cloud, Vercel [all free!], or a custom deployment platform.
- Include the link to the live front-end in your README.
Step 9: Document Everything and Follow Best Practices
- Project overview and goals
- Dataset description and link
- Model architecture and evaluation
- Cloud services used
- Setup and usage instructions
- Link to deployed API and front-end app
Learning Goal: Ethical Implications and Limitations
-
Reflect on ethical implications and limitations of your ML application
-
12 of the 48 are met by the README, which is in the repository root and was merged into
mainin pull request #8. Its sections are written against the assignment and linked from each entry. -
Choices the assignment offers, and what this project chose:
- Cloud storage (Google Cloud Storage, AWS S3, Firebase Storage, or cloud-hosted PostgreSQL): AWS S3.
- Experiment tracking (MLflow or Weights & Biases): MLflow.
- API framework (FastAPI or Flask): FastAPI.
- Cloud API platform (Google Cloud Run or Cloud Functions, AWS Lambda with API Gateway, or Azure Functions): AWS Lambda with API Gateway, in
us-east-1. - Front-end (Streamlit, Gradio, NextJS, or a custom web framework): a custom web app built with Vite, React, and TypeScript.
- Front-end host (Hugging Face Spaces, Streamlit Cloud, Vercel, or a custom deployment platform): a custom deployment platform, a private S3 bucket served over HTTPS by CloudFront.
-
Current test counts: 95 Python tests pass with a trained model (93 passed and 2 skipped without one), and 65 web tests pass (63 passed and 2 skipped without the files in
build/). The 14 Python test files intests/cover every module insrc/. See Makefile for how each count comes about.
Deliverable 1: GitHub Repository
"All code for preprocessing, training, serving, and deployment"
- Status: Met
- Where in the code:
- Preprocessing: the four steps in
src/data/(fetch_raw.py,clean.py,upload_to_s3.py,download_from_s3.py), andsrc/model/features.py. - Training:
src/model/train.pyandsrc/model/evaluate.py. - Serving:
src/api/app.pyandsrc/api/schemas.py. - Deployment:
src/api/lambda_handler.py,requirements-serve.txt, and the written AWS commands in Deploy the API and Deploy the Web App. TheDockerfileand thedeploy-web-app.ymlworkflow are deployment code too. - Front-end:
frontend/(the web app) andsrc/profiles.py(writes the team profiles file the web app reads).
- Preprocessing: the four steps in
- Docs: Phase 1 Development Guide, Where Is Each Piece?, Phase 2 Development Guide, Where Is Each Piece?, Phase 3 Development Guide, Where Is Each Piece?, Phase 4 Development Guide, Where Is Each Piece?, Phase 5 Development Guide, Where Is Each Piece?, and Deploy the API and Deploy the Web App for the deployment commands.
- Evidence: the file list above is the output of
git ls-files src. The 14 test files intests/cover every module insrc/, and the Python tests pass:
make pytest
Result: 95 passed with a trained model, 93 passed and 2 skipped without one.
"config.yaml for pipeline configuration"
- Status: Met
- Where in the code:
config/config.yaml, read throughload_configinsrc/config.py. The blocks are covered under Step 3, in the entry on controlling parameters. - Docs: Step 3: Add the Model and Tracking Settings
- Evidence:
git ls-files configlistsconfig/config.yaml. Training reads every setting from it, andtests/test_train.pychecks the result.
"requirements.txt or environment.yaml"
- Status: Met
- Where in the code:
requirements.txt, with every package pinned to an exact version.requirements-serve.txtlists the smaller set of packages that go into the AWS Lambda zip. - Docs: Makefile, What Must Be Set Up First? and Phase 4 Development Guide, How Do I Change a Package Version?
- Evidence: the Docker
basestage installs this file withpip install -r requirements.txtand the build succeeds. The train container reproduces the run summary byte for byte (see Step 5).
"A Dockerfile that can run the full project"
- Status: Met
- Where in the code:
Dockerfilein the project folder, with atraintarget and aservetarget..dockerignoredecides which files enter the image. The details are under Step 5. - Docs: How Is the Dockerfile Laid Out? and Run the Data Steps in the Container
- Evidence: see Step 5: Containerize with Docker. Both images build and run locally, and the tests pass inside both. The train image also runs every data step: the download, the cleaning (its table has the same SHA-256 as the committed one), the inputs summary, and the two web app data files. The S3 steps run in it when AWS settings are mounted.
"How to train the model"
- Status: Met
- Where in the code:
maininsrc/model/train.py, run bymake trainfrom theMakefile. - Docs: How Do I Do a Training Run?, make train, and the README section Setup and Usage.
- Evidence: a training run prints the scores and ends with
saved: mlflow-reference/latest-run. Validation accuracy is 63.10% and test accuracy 59.06%.
make train
"How to build and test the API locally"
- Status: Met
- Where in the code:
create_appinsrc/api/app.py, started bymake startfrom theMakefile. The tests are intests/test_api.py. - Docs: Phase 3 Development Guide, How Do I Run It Locally?, How Do I Ask for a Prediction?, make start, and the README section Setup and Usage.
- Evidence: after
make start, the worked example returns a home win probability of 0.3296. The 17 tests intests/test_api.pypass as part ofmake pytest.
make start
"How to deploy to the cloud"
- Status: Met
- Where in the code: the Lambda entry point
src/api/lambda_handler.py, the package listrequirements-serve.txt, and the workflow.github/workflows/deploy-web-app.ymlthat redeploys the web app. - Docs: Deploy the API, Deploy the Web App, Phase 4, Implementation, and the README section Cloud Services.
- Evidence: the deployed API answers at the public address given under Step 7, and the live web app answers at the address given under Step 8.
"MLFlow or Weights & Biases logging"
- Status: Met
- Where in the code:
log_runinsrc/model/train.py, called bymainin the same file.python -m src.model.traintherefore logs a run by itself, and then writes the readable copy inmlflow-reference/. This project chose MLflow. The details are under Step 4. - Docs: Step 6: Record the Run in MLflow
- Evidence: every training run adds a run folder to
mlflow-reference/. The pagemlflow-logging-reference.mdexplains the log, andrun-history.mdthere lists every run.
"Use of branches and pull requests (each group member must submit at least one PR)"
- Status: Met
- Where in the code: not code. The record is in git and on GitHub. This is a one-person project, so the only group member is the repository owner, who submitted all nine pull requests. Pull requests #1 (
phase_one), #2 (phase-two), #3 (phase-three), #4 (phase-four), #5 (phase-five), #6 (phase-five-p2), #7 (phase-six), #8 (phase-seven), and #9 (phase-seven-p2) are merged intomain. They show on the Pull requests tab of the repository. - Docs: Phase 7, Checklist, Step 6: Pre-Commit Checks and the Final Pull Request
- Evidence: the merge commits are listed by this read-only command. It prints nine lines, for pull requests #9 down to #1:
git log --merges --format='%h %s' main
"A clear project structure and commit history"
- Status: Met
- Where in the code:
- Layout:
src/data/(Phase 1 steps),src/model/(Phase 2 code),src/api/(Phases 3 and 4 code),src/profiles.py,src/season.py, andfrontend/(Phase 5),Dockerfileand.dockerignore(Phase 6),Makefileand.github/workflows/(the make commands and the four workflows: the Python tests, the web app tests, the docs site, and the web app deploy),scripts/checks/(the every-game checks against the live API),results/(the committed run summary),mlflow-reference/(the committed log of every training run),src/config.py(reads the settings),tests/(14 test files, which together cover every module insrc/),config/(settings), anddocs/(these pages). - Workflows: four GitHub workflows run in
.github/workflows/:test-python.yml,test-web.yml,deploy-docs.yml, anddeploy-web-app.yml. - Make commands: the
Makefilehas nine commands, each explained on Makefile. - Tests:
pytestruns all oftests/. They use made-up data and a stand-in S3 client, so they need no internet and no AWS account.
- Layout:
- Docs: Makefile, GitHub Workflows, and Design Manifest
- Evidence: the layout above is the output of
git ls-files. The history is nine branches for the seven phases (Phases 5 and 7 used two each), each merged by a numbered pull request (see the previous entry). The tests pass:
make pytest
Result: 95 passed (93 passed and 2 skipped without a model). The web tests give 65 passed (63 passed and 2 skipped without the files in build/):
make web-test
Deliverable 2: Front-End Application
"Be publicly accessible and linked in the README"
- Status: Met
- Where in the code: the live web app is at
https://d1nubiunzfwm0q.cloudfront.net. The README section Endpoints carries the link. The hosting is under Step 8. - Docs: How Is the Page Hosted? and the README section Endpoints
- Evidence: the address opens in a browser with no sign-in. Direct requests to the S3 bucket behind it get status 403, so CloudFront is the only public path. See the checks under Step 8.
"Send requests to your deployed model API (e.g., using requests or fetch)"
- Status: Met
- Where in the code: the
fetchcall toPOST /predictinfrontend/src/api.ts. The address it calls is set infrontend/src/config.ts. The deployed API ishttps://9awodatqc5.execute-api.us-east-1.amazonaws.com. - Docs: What Does the Browser Send? and The Preflight
- Evidence: all 992 ordered pairs of teams and all 272 games of the 2026 season were sent to the live API, and every pick and probability equals the local model's. The app tests in
frontend/src/api.test.tsrun undermake web-test.
"Display the model's predictions in an interactive, intuitive format"
- Status: Met
- Where in the code:
frontend/src/App.tsx(two team lists, the button, the result, and the failure messages),frontend/src/Picker.tsx, andfrontend/src/matchup.ts(the two inputs and the chances). - Docs: How Is the Answer Shown? and What Does Each Tab Do?
- Evidence: each team's record shows under its list, a bar splits the two chances, there is a light and a dark theme, and the text and graphics pass the WCAG contrast minimums in both. The 65 app tests pass.
"Be built with Streamlit, Gradio, NextJS, or a custom web framework"
- Status: Met
- Where in the code: a custom web app. It is a React and TypeScript app built with Vite, in
frontend/. The settings are infrontend/package.jsonandfrontend/vite.config.ts. It is not Streamlit or Gradio. - Docs: Phase 5, Development Guide and Phase 5, Overview
- Evidence:
npm run buildruns the type check andvite buildintofrontend/dist/, run from insidefrontend/:
npm run build
Step 1: Choose a Dataset and Define the Problem
"Select a public dataset (e.g., Kaggle, UCI, HuggingFace Datasets)."
- Status: Met
- Where in the code: the nflverse
games.csvfile, one row per NFL game since 1999. The address isdata.source_urlinconfig/config.yaml.fetch_rawinsrc/data/fetch_raw.pydownloads it and saves it asdata/raw/games.csv. - Docs: What Is the Source Data?
- Evidence: the dataset is public, and the fetch step needs no sign-in. The README section Dataset gives the link.
"Define a supervised learning task (classification or regression)."
- Status: Met
- Where in the code: binary classification. The question is whether the home team won. The answer is the
home_wincolumn built bybuild_model_tableinsrc/model/features.py. - Docs: What Is the Prediction Task? and Why Binary Classification and Not Regression?
- Evidence:
home_winholds only 1 and 0, andcheck_model_tablein the same file checks the table before training.
"Identify your target variable and evaluation metric."
- Status: Met
- Where in the code:
- Target:
home_win(1 if the home team won, 0 if not), listed inMODEL_COLUMNSinsrc/model/features.py. - Metric: accuracy, next to the always-pick-home baseline. It is computed by
score_groupinsrc/model/evaluate.py. Log loss is a second score that checks the win percentages.
- Target:
- Docs: What Is Accuracy? and Why Accuracy With a Baseline, and Log Loss as a Check?
- Evidence: validation accuracy is 63.10% (171 of 271 games) against an always-home baseline of 53.87%. Test accuracy is 59.06% (88 of 149) against 47.65%. The numbers are in
results/run-summary.json.
Step 2: Set Up Data Storage in the Cloud
"Clean and preprocess the dataset locally."
- Status: Met
- Where in the code:
clean_gamesinsrc/data/clean.py, run withpython -m src.data.clean. It writesdata/processed/nfl_matchups_2020_2026.csv. - Docs: Step 2: Clean the Raw Data
- Evidence: the cleaning tests are in
tests/test_clean.pyand run undermake pytest.
python -m src.data.clean
"Upload your cleaned data to a cloud storage service:"
- Status: Met
- Where in the code: this project chose AWS S3. It did not use Google Cloud Storage, Firebase Storage, or cloud-hosted PostgreSQL.
uploadinsrc/data/upload_to_s3.py, run withpython -m src.data.upload_to_s3. The bucket name and file name aredata.s3_bucketanddata.s3_keyinconfig/config.yaml.- The bucket itself:
510-m3-nfl-datasetinus-east-1. It was created manually in the AWS console, so no file in the repository creates it.
- The bucket itself:
- Docs: Step 3: Upload the Cleaned Table to S3, How Is the Cloud Storage Set Up?, and the README section Cloud Services
- Evidence: the upload step is tested with a stand-in S3 client in
tests/test_upload.py. Run against the real bucket:
python -m src.data.upload_to_s3
"Write a script to access and download the data programmatically in your pipeline."
- Status: Met
- Where in the code:
downloadinsrc/data/download_from_s3.py, run withpython -m src.data.download_from_s3. It savesdata/from-s3/nfl_matchups_2020_2026.csv.- Starting from the S3 copy:
load_gamesinsrc/model/features.pyreads only that downloaded file, never the local cleaned table.
- Starting from the S3 copy:
- Docs: Step 4: Download the Cleaned Table From S3
- Evidence: the download step is tested in
tests/test_download_from_s3.py. Run against the real bucket:
python -m src.data.download_from_s3
Step 3: Build a Reproducible ML Pipeline
The assignment adds a note under this step, which is not a requirement: "NOTE: We are not assessing your ML model. Your model could have terrible accuracy. That is fine! Not the point of the assignment, don't get hung up on your model." The requirement is a clean, repeatable process, and the evidence for it is under the entry on config.yaml below.
"Choose a simple model (e.g., logistic regression, random forest, XGBoost)."
- Status: Met
- Where in the code: logistic regression behind a standardizing step, kept together as one pipeline.
build_pipelineandfit_pipelineinsrc/model/train.py. - Docs: Step 4: Fit the Scaler and the Model
- Evidence: the model settings are
model.*inconfig/config.yaml, andtests/test_train.pyfits it.
"Data ingestion (from the cloud)"
- Status: Met
- Where in the code:
src/data/download_from_s3.py, thenload_gamesinsrc/model/features.py. - Docs: Step 4: Download the Cleaned Table From S3
- Evidence:
load_gamesreads onlydata/from-s3/nfl_matchups_2020_2026.csv. The data steps (fetch, clean, upload, download) are separate commands.python -m src.model.trainthen runs the rest in order: load the downloaded table, build the inputs, split, fit, score, save, and log.
"Preprocessing and feature engineering"
- Status: Met
- Where in the code: preprocessing is
src/data/clean.py. Feature engineering isstandings_before_weekandbuild_model_tableinsrc/model/features.py. - Docs: Step 1: Feature Engineering
- Evidence: the tests are in
tests/test_features.pyandtests/test_clean.py.
"Train/validation/test split"
- Status: Met
- Where in the code:
split_gamesinsrc/model/features.py, withsplit_seasonsinsrc/config.py. The split is by season, set by thesplitblock inconfig/config.yaml. - Docs: Step 2: Split the Games by Season
- Evidence:
tests/test_split.pychecks the split. The run summary records 271 validation games and 149 test games.
"Model training and evaluation"
- Status: Met
- Where in the code: training is
fit_pipelineinsrc/model/train.py. Evaluation isscore_groupandplot_confusion_matrixinsrc/model/evaluate.py. - Docs: Step 5: Score the Model
- Evidence: a training run prints validation accuracy 63.10% and test accuracy 59.06%.
tests/test_evaluate.pyandtests/test_train.pycover this step.
"Control parameters via a config.yaml file (e.g., learning rate, split ratio, etc.)."
- Status: Met
- Where in the code:
config/config.yaml, read throughsrc/config.py. Changing a run means editing that file, not the code. Its blocks are:data: paths, bucket, and region.window: first and last season, and the last scored week.split: last training season and the validation season.model: version, seed, output file, and the logistic regression settings.tracking: MLflow names and folders.frontend: where the web app's team profiles file and season file are written.- Two things live in code, not in the file: the 0.5 cutoff that turns a probability into a pick, and the list of columns that cleaning keeps.
- Docs: Step 3: Add the Model and Tracking Settings, How Do I Change a Model Setting?, and How Do I Change the Split?
- Evidence: two runs with the same settings give identical scores.
test_same_settings_give_the_same_probabilitiesintests/test_train.pychecks it.results/run-summary.jsonis byte for byte the same on every run with the same settings and data. See What Makes a Rerun Give the Same Result?.
Step 4: Track Experiments
The assignment says "Use MLFlow or Weights & Biases to:". This project chose MLflow. Its settings are the tracking block in config/config.yaml.
"Track experiment runs, model parameters, and evaluation metrics."
- Status: Met
- Where in the code:
log_runinsrc/model/train.py.- Parameters (15):
model_version,random_seed,C,solver,max_iter,feature_names,train_start_season,train_end_season,validation_season,test_season,n_train,n_validation,n_test,scikit_learn_version, anddata_sha256(a fingerprint of the downloaded table, fromfile_fingerprintin the same file). - Metrics (8):
train_accuracy,validation_accuracy,test_accuracy,validation_log_loss,test_log_loss,baseline_train,baseline_validation,baseline_test. - Automatic tags: MLflow also records the git commit, branch, and repository address of each run.
- Parameters (15):
- Docs: What Is Logged for Each Run?
- Evidence: each run's 15 parameters and 8 metrics are written to
mlflow-reference/latest-run/params.jsonandmetrics.json. The readable log is explained onmlflow-logging-reference.md.
"Log artifacts (trained model, plots, etc.) for version control and reproducibility."
- Status: Met
- Where in the code:
log_runinsrc/model/train.py.- Files stored with each run (3):
model/model.joblib(the trained model),plots/confusion_matrix_validation.png(the one plot), andconfig/config.yaml(a copy of the settings used). - The plot is drawn by
plot_confusion_matrixinsrc/model/evaluate.py. - A second copy of the model, in MLflow's own format: each run also has one logged model,
pipeline-mlflow-format, stored undermlartifacts/models/.model/model.joblibstays the working copy that the API loads. - A readable record outside MLflow:
results/run-summary.json, written bywrite_run_summaryin the same file. It holds the settings, the data fingerprint, the scores, and the learned weights, and it is committed to git.
- Files stored with each run (3):
- Docs: Why Is the Model Stored Twice?, What Is the Run Summary File?, and What Does the Confusion Matrix Show?
- Evidence: where to find the recorded runs:
- In the repository:
results/run-summary.jsonshows the latest run's settings, scores, and learned weights without MLflow. - In the repository:
mlflow-reference/, written bypython -m src.model.export_mlflow(src/model/export_mlflow.py), which training calls. It is a log of every training run: each run's id, git commit, 15 parameters, 8 metrics, config copy and plot, and the logged model's text files, withrun-history.mdlisting every run and pictures of the MLflow screen. Its page ismlflow-logging-reference.md. - On this computer only: the run record
mlflow.dbin the project folder and the run files inmlartifacts/. Both are created by training and are not committed, because they store absolute paths on one computer. The saved model filemodels/model.joblibis also not committed. - To browse them: run
make start-web-mland openhttp://127.0.0.1:5001.
- In the repository:
make start-web-ml
Step 5: Containerize with Docker
"Installs all dependencies."
- Status: Met
- Where in the code:
Dockerfile. Itsbasestage installsrequirements.txtonpython:3.13.14-slim..dockerignoredecides which files enter the image. - Docs: How Is the Dockerfile Laid Out? and What Goes Into the Image?
- Evidence: the image builds from the project folder alone, with no virtual environment and no AWS account, and the tests pass inside it.
"Includes entry points for training and serving."
- Status: Met
- Where in the code: the
traintarget's command ispython -m src.model.train, and theservetarget's command ispython -m uvicorn src.api.app:app --host 0.0.0.0 --port 8000. Both are in theDockerfile. Run them withmake docker-trainandmake docker-serve. - Docs: What Does Each Target Do?, make docker-train, and make docker-serve
- Evidence: both commands run on a computer with Docker Desktop:
make docker-train
make docker-serve
"Build and run your Docker image locally to test reproducibility."
- Status: Met
- Where in the code: the
docker-trainanddocker-servecommands in theMakefile. - Docs: Phase 6 Implementation, What Was Checked? and the Phase 6 Development Guide
- Evidence: the train container's run summary is byte for byte
results/run-summary.json. The serve container answers the worked example with 0.3296, like the local API. The tests pass inside both images: 93 passed and 2 skipped in the train image, and 95 passed in the serve image. The serve image trains its own model during the build, so it needs no file from outside the image. See Check That It Matches the Project.
Step 6: Serve Your Model as an API
"Load your trained model."
- Status: Met
- Where in the code: FastAPI is the framework. The app, the start-up step that loads the saved model once, and the 0.5 pick rule are in
src/api/app.py(create_app,load_model,label_for). - Docs: How Does the Service Work? and Step 1: Load the Saved Model at Start-Up
- Evidence: without
models/model.joblibthe service stops at start-up with "No saved model at models/model.joblib. Run python -m src.model.train first." The tests are intests/test_api.py.
"Create a /predict endpoint that accepts JSON input and returns a prediction."
- Status: Met
- Where in the code:
POST /predictinsrc/api/app.py, with the request and response shapes insrc/api/schemas.py. The request holdswin_pct_differentialandpoint_diff_per_game_differential. The response holdsprediction,predicted_label,home_win_probability, andmodel_version. - Docs: What Is in the Response? and Step 3: Add the
POST /predictRoute - Evidence: the worked example
{"win_pct_differential": -0.5, "point_diff_per_game_differential": -18.0}returns a home win probability of 0.3296.
"Test your API locally using curl or Postman."
- Status: Met
- Where in the code: start it with
make start, which runspython -m uvicorn src.api.app:app --port 8000. Then send requests withcurlor open the test page at/docs. The tests are intests/test_api.py. - Docs: How Do I Run It Locally?, How Do I Ask for a Prediction?, and How Can I Try It in a Browser?
- Evidence: 17 tests in
tests/test_api.pycover both routes, the input checks, and the start-up checks, and all pass undermake pytest. A manual request:
curl -X POST http://127.0.0.1:8000/predict -H "Content-Type: application/json" -d '{"win_pct_differential": -0.5, "point_diff_per_game_differential": -18.0}'
Step 7: Deploy the API to the Cloud
"Choose a cloud deployment platform:"
- Status: Met
- Where in the code: this project chose AWS Lambda with API Gateway, both in
us-east-1. It did not use Google Cloud Run, Cloud Functions, or Azure Functions. The Lambda function is510-m3-nfl-predict-api(entry pointsrc/api/lambda_handler.py, packages listed inrequirements-serve.txt), behind the HTTP API510-m3-nfl-predict-http-api. - Docs: Phase 4, Implementation, What Was Deployed?, Deploy the API, and the README section Cloud Services
- Evidence: the Lambda entry point is tested without AWS in
tests/test_lambda_handler.py(Step 2: Test the Entry Point With No AWS). The deployed API answers at the address under the next entry.
"Package your API and deploy it so that the /predict endpoint is publicly accessible."
- Status: Met
- Where in the code: the zip is built by the steps on the Phase 4 Deployment Guide, and the entry point is
src/api/lambda_handler.py(see the previous entry). The public address ishttps://9awodatqc5.execute-api.us-east-1.amazonaws.com.- CORS: it is set on API Gateway, not in the app, so the browser-based front-end can call
/predict. It allows two origins, the live pagehttps://d1nubiunzfwm0q.cloudfront.netand the local dev serverhttp://localhost:5173, with the methodsPOST,GET, andOPTIONS, and the headercontent-type. Other origins get no CORS headers.
- CORS: it is set on API Gateway, not in the app, so the browser-based front-end can call
- Docs: Step 7: Create the API Gateway HTTP API, Step 8: Set CORS on the Gateway, The Preflight, and Create the HTTP API
- Evidence: the address answers a request with no sign-in (see the next entry). The CORS list is checked by the preflight request in Step 9: Check the Public Address.
"Confirm your endpoint works using an HTTP request with test data."
- Status: Met
- Where in the code: the deployed
POST /predictathttps://9awodatqc5.execute-api.us-east-1.amazonaws.com. - Docs: Step 9: Check the Public Address and Step 10: Check the Deployed Model Against the Local Model
- Evidence: a
POST /predictwith the inputs -0.5 and -18.0 returns{"prediction": 0, "predicted_label": "away win", "home_win_probability": 0.3296, "model_version": "v1.0"}:
curl -X POST https://9awodatqc5.execute-api.us-east-1.amazonaws.com/predict -H "Content-Type: application/json" -d '{"win_pct_differential": -0.5, "point_diff_per_game_differential": -18.0}'
Checked on every game: all 1,759 games sent through the public address gave the same pick and probability as the local model.
Step 8: Build the Front-End Interface
"Create a lightweight UI using Streamlit, Gradio, or a simple web app."
- Status: Met
- Where in the code: a simple web app built with Vite, using the dev server for local work and
vite buildfor the published files. It is the React and TypeScript app infrontend/.npm run devstarts the dev server on port 5173, andnpm run buildruns the type check andvite buildintofrontend/dist/. It is not Streamlit or Gradio. - Docs: Phase 5 Development Guide and How Do I Run It Locally?
- Evidence:
make start-webopens the dev server athttp://localhost:5173, andmake web-testruns 65 tests that pass.
make web-test
"Collect user input, send it to the deployed API using requests or fetch, and display the prediction."
- Status: Met
- Where in the code:
frontend/src/App.tsx(two team lists, the Analyze button, the result, and the failure messages),frontend/src/matchup.ts(the two inputs and the chances), andfrontend/src/api.ts(thefetchcall toPOST /predict). The standings come fromfrontend/src/data/team-profiles.json, written bypython -m src.profiles(src/profiles.py). - Docs: Phase 5, Implementation Part 1 and Phase 5, Implementation Part 2
- Evidence: 65 app tests pass. All 992 ordered pairs of teams, and all 272 games of the 2026 season, were sent to the live API, with every pick and probability equal to the local model. The page is readable and interactive: each team's record under its list, a bar split between the two chances, a light and a dark theme, and text and graphics that pass the WCAG contrast minimums in both.
"Host your app on Hugging Face Spaces, Streamlit Cloud, Vercel [all free!], or a custom deployment platform."
- Status: Met
- Where in the code: this project chose a custom deployment platform, not Hugging Face Spaces, Streamlit Cloud, or Vercel. The built files sit in a private S3 bucket served over HTTPS through CloudFront. The bucket is
510-m3-nfl-web-appand the CloudFront distribution is athttps://d1nubiunzfwm0q.cloudfront.net, with the origin access control510-m3-nfl-web-app-oac, all inus-east-1. It is redeployed by.github/workflows/deploy-web-app.yml, on a change underfrontend/onmain. - Docs: How Is the Page Hosted?, How Does a Change Reach the Live Web App?, and the Phase 5 Deployment Guide
- Evidence: the served files are byte for byte the tested build, and direct requests to the bucket get status 403.
"Include the link to the live front-end in your README."
- Status: Met
- Where in the code: the README section Endpoints in
README.mdin the repository root. It gives the live web app,https://d1nubiunzfwm0q.cloudfront.net, and the live API,https://9awodatqc5.execute-api.us-east-1.amazonaws.com. - Docs: Phase 7, Checklist, Step 1: Write the README
- Evidence: the README on
mainholds both links in its "Endpoints" section, and both addresses answered in the Phase 7 live checks.
Step 9: Document Everything and Follow Best Practices
The README is README.md in the repository root. Its sections are "Project Overview", "Dataset", "Model and Evaluation", "Cloud Services", "Setup and Usage", "Endpoints", and "Limitations". Each of the six entries below links to the section that meets it. The README links to these docs for detail instead of repeating them.
"Project overview and goals"
- Status: Met
- Where in the code: the README section Project Overview.
- Docs: Phase 7, Checklist, Step 1: Write the README
- Evidence: the section states what the project predicts, who it is for, and that it is a coursework project not affiliated with the National Football League.
"Dataset description and link"
- Status: Met
- Where in the code: the README section Dataset.
- Docs: What Is the Source Data?
- Evidence: the section links the nflverse games file and names the games used (regular season, 2020 through 2026 week 10).
"Model architecture and evaluation"
- Status: Met
- Where in the code: the README section Model and Evaluation.
- Docs: Step 4: Fit the Scaler and the Model and What Is Accuracy?
- Evidence: logistic regression on two inputs. Validation accuracy 63.10% (171 of 271) against the always-home baseline of 53.87%, and test accuracy 59.06% (88 of 149) against 47.65%. Each number is recomputed from
results/run-summary.json.
"Cloud services used"
- Status: Met
- Where in the code: the README section Cloud Services.
- Docs: Phase 4 Implementation, How Is the Page Hosted?, and How Are the Docs Published?
- Evidence: the section names S3 for the data and the web app, Lambda behind API Gateway for the API, CloudFront for the web app, DynamoDB for the feedback form, and GitHub Pages for the docs.
"Setup and usage instructions"
- Status: Met
- Where in the code: the README section Setup and Usage, which gives the run environment and the
makecommands. - Docs: Makefile, What Must Be Set Up First?, How Do I Do a Training Run?, and Phase 3 Development Guide, How Do I Run It Locally?
- Evidence: Phase 7 rebuilt the project from a clean copy using only the README (Step 3: Rebuild From a Clean Copy), with the results summarized in What Did the Checks Find and Fix?. The nine make commands are all documented on Makefile.
"Link to deployed API and front-end app"
- Status: Met
- Where in the code: the README section Endpoints. The API is
https://9awodatqc5.execute-api.us-east-1.amazonaws.comand the web app ishttps://d1nubiunzfwm0q.cloudfront.net. - Docs: Step 9: Check the Public Address and How Is the Page Hosted?
- Evidence: Phase 7, Checklist, Step 4: Check the Live Services re-checks both addresses before hand-in.
Learning Goal: Ethical Implications and Limitations
The assignment's Learning Goals ask every project to "Reflect on ethical implications and limitations of your ML application". It is listed as 11. Ethics and Limitations on Project Requirements.
"Reflect on ethical implications and limitations of your ML application"
- Status: Met
- Where in the code: the README section Limitations.
- Docs: Design Manifest records the choices behind the model, and What Does the Confusion Matrix Show? shows where the model is wrong.
- Evidence: the section states that the model sees only two numbers and is wrong on about 41% of the 2026 test games, that it picks the home team more often than the home team wins (172 home picks in 2025 against 146 home wins), that predictions are for reference only, that no personal data is collected, and that the project is not affiliated with the National Football League.