AboutWhat I doProjectsLabContact
  • MLOPS
  • FASTAPI
  • DOCKER
  • MONITORING
  • +1

Credit Risk Platform

Credit Risk Platform

End-to-end MLOps platform for credit-default scoring: reproducible training with a versioned model registry, a FastAPI inference API with input validation, PSI drift monitoring and a Prometheus and Grafana observability stack, all containerised with CI. Code at github.com/delcenjo/credit-risk-platform.

I wanted to learn the part of ML that courses almost never teach: what happens to the model after training. This platform trains and versions a credit risk model, serves it behind a validated API and watches live traffic for drift, with all the infrastructure to run it locally with docker-compose.

  • ROC-AUC0.78
  • Cost-based threshold0.14
  • DriftPSI + Grafana

The model is the easy part

The classifier sits around 0.78 ROC-AUC, and that is not the point of the project. The point is everything else: training compares candidates by cross-validation, calibrates the winner, picks the decision threshold by cost (0.14, not the default 0.5) and registers every version with its metrics, hyperparameters and data hash.

An API that refuses garbage

The FastAPI service validates every input with Pydantic schemas: an out-of-range field returns a clear 422 instead of a silently wrong score. Every response includes the probability, the decision (approve/decline) and the exact model version that produced it.

Finding out before it breaks

A reference profile of the training data and Population Stability Index metrics over live traffic, exposed to Prometheus and visualised in Grafana next to latency and the score distribution. If the data shifts, the drift metric says so before the predictions start failing silently.

Chart with the calibration curve hugging the ideal diagonal
Calibration curve of the served model: predicted probability against actual frequency
U-shaped chart of expected cost with the minimum marked
Expected cost against the decision threshold: the minimum falls at 0.14, not 0.5

Interactive notebook

Runs real Python in your browser via Pyodide (WebAssembly), no server involved: the first load takes a few seconds to start the interpreter, and after that every cell can be re-run.

Column-by-column data profiling before modelling

A runnable Jupyter notebook: real Python running in your browser via Pyodide, no server involved.

Shall we connect?

Let's talk: feedback, collaboration or an opportunity.

You can write to me about a project, a technical question, to give me feedback, or about an internship or a first junior role. I always reply.

Write to me

Next projects:

Built with

PythonPyTorchscikit-learnpandasNumPyJupyterHugging FaceLangChainFastAPIPydanticDockerGitHub ActionsPrometheusGrafanaMLflowPostgreSQLGitGitHubLinuxStreamlitSQLiteAnthropicBashPyPIOllamaPythonPyTorchscikit-learnpandasNumPyJupyterHugging FaceLangChainFastAPIPydanticDockerGitHub ActionsPrometheusGrafanaMLflowPostgreSQLGitGitHubLinuxStreamlitSQLiteAnthropicBashPyPIOllama
hola@jmwebsoluciones.com