# davidadsp/annitia-data-challenge architecture

> Architecture diagram of the GitHub repository davidadsp/annitia-data-challenge, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/davidadsp/annitia-data-challenge
- Repository: https://github.com/davidadsp/annitia-data-challenge

## Overview

This is a reproducible survival-prediction competition solution. Its main workflow takes challenge tables through longitudinal feature construction, endpoint-specific survival modeling and validation, then produces predictions and diagnostics. The README documents hepatic sequence and routed activity signals, a separate death-endpoint blend, and explainability outputs. The notebook builder contains the modeling workflow; the local runner executes its code cells, while a separate helper optionally uploads the generated submission. Internal modeling details are partly unsampled, so those links rely on README descriptions.

Main entry points: [`workflow/build_submission_notebook.py`](https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py) (Survival CV and blends), [`workflow/run_notebook_locally.py`](https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/run_notebook_locally.py) (Local notebook runner), [`submit.py`](https://github.com/davidadsp/annitia-data-challenge/blob/main/submit.py) (Upload helper), [`artifacts`](https://github.com/davidadsp/annitia-data-challenge/tree/main/artifacts) (Generated artifacts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Reproduction workflow"]
  node_notebook_builder["Notebook builder"]
  node_local_runner["Local notebook runner"]
end

subgraph group_model["Survival modeling"]
  node_feature_engineering["Longitudinal features"]
  node_cv_blending["Survival CV and blends"]
  node_hepatic_signals["Hepatic sequence and activity"]
  node_death_model["Death endpoint blend"]
end

subgraph group_outputs["Results and submission"]
  node_predictions["Submission predictions"]
  node_diagnostics["Metrics and explanations"]
  node_artifacts[("Generated artifacts")]
  node_upload_helper["Upload helper<br/>[submit.py]"]
end

node_analyst(("Challenge user"))
node_challenge_data[("Challenge tables")]
node_trustii["Trustii API"]

node_analyst -->|"builds notebook"| node_notebook_builder
node_analyst -->|"runs workflow"| node_local_runner
node_challenge_data -->|"provides tables"| node_feature_engineering
node_notebook_builder -->|"generates notebook"| node_local_runner
node_local_runner -->|"executes cells"| node_feature_engineering
node_feature_engineering -->|"builds model inputs"| node_cv_blending
node_cv_blending -->|"adds hepatic signals"| node_hepatic_signals
node_cv_blending -->|"fits death blend"| node_death_model
node_cv_blending -->|"produces predictions"| node_predictions
node_hepatic_signals -->|"contributes signals"| node_predictions
node_death_model -->|"contributes blend"| node_predictions
node_cv_blending -->|"reports validation"| node_diagnostics
node_predictions -->|"writes outputs"| node_artifacts
node_diagnostics -->|"writes diagnostics"| node_artifacts
node_analyst -->|"optionally uploads"| node_upload_helper
node_upload_helper -->|"posts files"| node_trustii

click node_challenge_data "https://github.com/davidadsp/annitia-data-challenge/tree/main/data"
click node_notebook_builder "https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py"
click node_local_runner "https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/run_notebook_locally.py"
click node_feature_engineering "https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py"
click node_cv_blending "https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py"
click node_hepatic_signals "https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py"
click node_death_model "https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py"
click node_predictions "https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py"
click node_diagnostics "https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py"
click node_artifacts "https://github.com/davidadsp/annitia-data-challenge/tree/main/artifacts"
click node_upload_helper "https://github.com/davidadsp/annitia-data-challenge/blob/main/submit.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_notebook_builder,node_local_runner,node_analyst toneBlue
class node_feature_engineering,node_cv_blending,node_hepatic_signals,node_death_model,node_challenge_data toneAmber
class node_predictions,node_diagnostics,node_artifacts,node_upload_helper,node_trustii toneMint
```

## Components

### Reproduction workflow

- [Notebook builder](https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py): `workflow/build_submission_notebook.py`
- [Local notebook runner](https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/run_notebook_locally.py): `workflow/run_notebook_locally.py`

### Survival modeling

- [Longitudinal features](https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py): `workflow/build_submission_notebook.py`
- [Survival CV and blends](https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py): `workflow/build_submission_notebook.py`
- [Hepatic sequence and activity](https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py): `workflow/build_submission_notebook.py`
- [Death endpoint blend](https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py): `workflow/build_submission_notebook.py`

### Results and submission

- [Submission predictions](https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py): `workflow/build_submission_notebook.py`
- [Metrics and explanations](https://github.com/davidadsp/annitia-data-challenge/blob/main/workflow/build_submission_notebook.py): `workflow/build_submission_notebook.py`
- [Generated artifacts](https://github.com/davidadsp/annitia-data-challenge/tree/main/artifacts): `artifacts`
- [Upload helper](https://github.com/davidadsp/annitia-data-challenge/blob/main/submit.py): `submit.py`

### Other components

- **Challenge user**
- [Challenge tables](https://github.com/davidadsp/annitia-data-challenge/tree/main/data): `data`
- **Trustii API**

## Connections

- Challenge user → Notebook builder: builds notebook (evidence: `README.md`)
- Challenge user → Local notebook runner: runs workflow (evidence: `README.md`)
- Challenge tables → Longitudinal features: provides tables (evidence: `README.md`)
- Notebook builder → Local notebook runner: generates notebook (evidence: `README.md`)
- Local notebook runner → Longitudinal features: executes cells (evidence: `workflow/run_notebook_locally.py`)
- Longitudinal features → Survival CV and blends: builds model inputs (evidence: `README.md`)
- Survival CV and blends → Hepatic sequence and activity: adds hepatic signals (evidence: `README.md`)
- Survival CV and blends → Death endpoint blend: fits death blend (evidence: `README.md`)
- Survival CV and blends → Submission predictions: produces predictions (evidence: `README.md`)
- Hepatic sequence and activity → Submission predictions: contributes signals (evidence: `README.md`)
- Death endpoint blend → Submission predictions: contributes blend (evidence: `README.md`)
- Survival CV and blends → Metrics and explanations: reports validation (evidence: `README.md`)
- Submission predictions → Generated artifacts: writes outputs (evidence: `README.md`)
- Metrics and explanations → Generated artifacts: writes diagnostics (evidence: `README.md`)
- Challenge user → Upload helper: optionally uploads (evidence: `README.md`)
- Upload helper → Trustii API: posts files (evidence: `submit.py`)
