Skip to content

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

Deliverable 2: Front-End Application

Step 1: Choose a Dataset and Define the Problem

Step 2: Set Up Data Storage in the Cloud

Step 3: Build a Reproducible ML Pipeline

Step 4: Track Experiments

Step 5: Containerize with Docker

Step 6: Serve Your Model as an API

Step 7: Deploy the API to the Cloud

Step 8: Build the Front-End Interface

Step 9: Document Everything and Follow Best Practices

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 main in 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 in tests/ cover every module in src/. See Makefile for how each count comes about.

Deliverable 1: GitHub Repository

"All code for preprocessing, training, serving, and deployment"

make pytest

Result: 95 passed with a trained model, 93 passed and 2 skipped without one.

"config.yaml for pipeline configuration"

"requirements.txt or environment.yaml"

"A Dockerfile that can run the full project"

  • Status: Met
  • Where in the code: Dockerfile in the project folder, with a train target and a serve target. .dockerignore decides 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"

make train

"How to build and test the API locally"

make start

"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)"

  • 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 into main. 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"

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 fetch call to POST /predict in frontend/src/api.ts. The address it calls is set in frontend/src/config.ts. The deployed API is https://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.ts run under make web-test.

"Display the model's predictions in an interactive, intuitive format"

"Be built with Streamlit, Gradio, NextJS, or a custom web framework"

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.csv file, one row per NFL game since 1999. The address is data.source_url in config/config.yaml. fetch_raw in src/data/fetch_raw.py downloads it and saves it as data/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)."

"Identify your target variable and evaluation metric."

Step 2: Set Up Data Storage in the Cloud

"Clean and preprocess the dataset locally."

python -m src.data.clean

"Upload your cleaned data to a cloud storage service:"

python -m src.data.upload_to_s3

"Write a script to access and download the data programmatically in your pipeline."

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)."

"Data ingestion (from the cloud)"

"Preprocessing and feature engineering"

"Train/validation/test split"

"Model training and evaluation"

"Control parameters via a config.yaml file (e.g., learning rate, split ratio, etc.)."

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_run in src/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, and data_sha256 (a fingerprint of the downloaded table, from file_fingerprint in 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.
  • Docs: What Is Logged for Each Run?
  • Evidence: each run's 15 parameters and 8 metrics are written to mlflow-reference/latest-run/params.json and metrics.json. The readable log is explained on mlflow-logging-reference.md.

"Log artifacts (trained model, plots, etc.) for version control and reproducibility."

  • Status: Met
  • Where in the code: log_run in src/model/train.py.
    • Files stored with each run (3): model/model.joblib (the trained model), plots/confusion_matrix_validation.png (the one plot), and config/config.yaml (a copy of the settings used).
    • The plot is drawn by plot_confusion_matrix in src/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 under mlartifacts/models/. model/model.joblib stays the working copy that the API loads.
    • A readable record outside MLflow: results/run-summary.json, written by write_run_summary in the same file. It holds the settings, the data fingerprint, the scores, and the learned weights, and it is committed to git.
  • 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.json shows the latest run's settings, scores, and learned weights without MLflow.
    • In the repository: mlflow-reference/, written by python -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, with run-history.md listing every run and pictures of the MLflow screen. Its page is mlflow-logging-reference.md.
    • On this computer only: the run record mlflow.db in the project folder and the run files in mlartifacts/. Both are created by training and are not committed, because they store absolute paths on one computer. The saved model file models/model.joblib is also not committed.
    • To browse them: run make start-web-ml and open http://127.0.0.1:5001.
make start-web-ml

Step 5: Containerize with Docker

"Installs all dependencies."

"Includes entry points for training and serving."

  • Status: Met
  • Where in the code: the train target's command is python -m src.model.train, and the serve target's command is python -m uvicorn src.api.app:app --host 0.0.0.0 --port 8000. Both are in the Dockerfile. Run them with make docker-train and make 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-train and docker-serve commands in the Makefile.
  • 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."

"Create a /predict endpoint that accepts JSON input and returns a prediction."

  • Status: Met
  • Where in the code: POST /predict in src/api/app.py, with the request and response shapes in src/api/schemas.py. The request holds win_pct_differential and point_diff_per_game_differential. The response holds prediction, predicted_label, home_win_probability, and model_version.
  • Docs: What Is in the Response? and Step 3: Add the POST /predict Route
  • 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."

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:"

"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 is https://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 page https://d1nubiunzfwm0q.cloudfront.net and the local dev server http://localhost:5173, with the methods POST, GET, and OPTIONS, and the header content-type. Other origins get no CORS headers.
  • 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."

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 build for the published files. It is the React and TypeScript app in frontend/. npm run dev starts the dev server on port 5173, and npm run build runs the type check and vite build into frontend/dist/. It is not Streamlit or Gradio.
  • Docs: Phase 5 Development Guide and How Do I Run It Locally?
  • Evidence: make start-web opens the dev server at http://localhost:5173, and make web-test runs 65 tests that pass.
make web-test

"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."

  • 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-app and the CloudFront distribution is at https://d1nubiunzfwm0q.cloudfront.net, with the origin access control 510-m3-nfl-web-app-oac, all in us-east-1. It is redeployed by .github/workflows/deploy-web-app.yml, on a change under frontend/ on main.
  • 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.
  • Status: Met
  • Where in the code: the README section Endpoints in README.md in 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 main holds 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 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"

"Cloud services used"

"Setup and usage instructions"

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.