How ubeyozcan/pnc-pricing-engine-backend works
Project type and purpose
• This is a Python‐based backend service built with FastAPI.
• It includes both an ML pipeline (data loading, EDA, model building) and a REST API layer that serves prebuilt models.
• Artifacts (trained models in pickle form) are stored under models/prod and used at runtime by the API.
File structure
• Top‐level scripts and dirs:
– EDA/eda.py: exploratory data analysis, one‐off analyses.
– build_models.py: orchestrates data loading via src/DataFactory and model training via src/ModelFactory, then writes pickles into models/prod.
– main.py: application entrypoint (likely loads models and dispatches to app/runapp).
– app/: contains the API code:
• runapp.py – starts the FastAPI server (uvicorn?).
• database.py – sets up database connections or ORM.
– models/: stores data inputs (models/data/*.csv) and production artifacts (models/prod/*.pickle).
– src/: library modules implementing factory patterns:
• DataFactory – data ingestion, cleaning.
• ModelFactory – model instantiation, training, evaluation.
– render.yaml, requirements.txt, pyproject.toml – deployment config and dependencies.
README
• Very brief: “Fast API for the backend.”
• Implies the primary purpose is exposing model inference or data services over HTTP.