# unique-func/adialab2026_distilledoracle architecture

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

- Interactive diagram: https://gitdiagram.com/unique-func/adialab2026_distilledoracle
- Repository: https://github.com/unique-func/adialab2026_distilledoracle

## Overview

This repository is a structural-break detection competition artifact: it trains three model packages, combines their predictions, and exposes a Crunch inference entrypoint. The documented training flow runs Anil, Tarik, and Cihat stages before fitting the blend; inference loads the shipped packages and produces predictions. The graph preserves each package’s main modeling approach and the integer-grid detector. Some package internals are unsampled, so those components are represented at their supported source or directory paths rather than expanded speculatively.

Main entry points: [`main.py`](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/main.py) (Root pipeline), [`anil/main.py`](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/anil/main.py) (Anil pipeline), [`cihat/main.py`](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/cihat/main.py) (Cihat entry), [`cihat/run.py`](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/cihat/run.py) (Cihat training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Submission entry"]
  node_root["Root pipeline<br/>[main.py]"]
  node_grid["Grid detector<br/>[precision_grid.py]"]
end

subgraph group_anil["Anil models"]
  node_anil_pipeline["Anil pipeline<br/>[main.py]"]
  node_anil_features["Streaming features"]
  node_anil_mlp["RealMLP model<br/>[train.py]"]
end

subgraph group_tarik["Tarik models"]
  node_tarik_entry["Tarik entry<br/>[main.py]"]
  node_tarik_runtime["Tarik runtime<br/>[current.py]"]
  node_tarik_graph["Retained features<br/>[retention_graph.py]"]
end

subgraph group_cihat["Cihat models"]
  node_cihat_entry["Cihat entry<br/>[main.py]"]
  node_cihat_train["Cihat training<br/>[run.py]"]
  node_cihat_models["Cihat predictors"]
  node_cihat_rmv["RMV features<br/>[rmv.py]"]
  node_cihat_vol["Volatility model<br/>[model.py]"]
end

subgraph group_ensemble["Ensemble output"]
  node_blend["Prediction blend<br/>[blend.py]"]
  node_blend_fit["Blend fitting<br/>[blend_fit.py]"]
end

node_runner(("Crunch runner"))

node_runner -->|"invokes"| node_root
node_root -->|"trains and infers"| node_anil_pipeline
node_root -->|"trains and infers"| node_tarik_entry
node_root -->|"trains and infers"| node_cihat_entry
node_root -->|"uses detector"| node_grid
node_root -->|"combines members"| node_blend
node_anil_pipeline -->|"builds features"| node_anil_features
node_anil_pipeline -->|"trains model"| node_anil_mlp
node_tarik_entry -->|"dispatches training"| node_tarik_runtime
node_tarik_runtime -->|"uses feature graph"| node_tarik_graph
node_cihat_entry -->|"runs training"| node_cihat_train
node_cihat_train -->|"fits RMV"| node_cihat_rmv
node_cihat_train -->|"trains volatility"| node_cihat_vol
node_cihat_entry -->|"uses predictors"| node_cihat_models
node_blend_fit -->|"fits weights"| node_blend
node_root -->|"fits ensemble"| node_blend_fit

click node_root "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/main.py"
click node_grid "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/precision_grid.py"
click node_anil_pipeline "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/anil/main.py"
click node_anil_features "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/anil/features/feature_window_scan.py"
click node_anil_mlp "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/anil/models/pointwise_realmlp/train.py"
click node_tarik_entry "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/tarik/main.py"
click node_tarik_runtime "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/tarik/sbrt/deployment/current.py"
click node_tarik_graph "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/tarik/sbrt/deployment/retention_graph.py"
click node_cihat_entry "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/cihat/main.py"
click node_cihat_train "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/cihat/run.py"
click node_cihat_models "https://github.com/unique-func/adialab2026_distilledoracle/tree/main/cihat/submission"
click node_cihat_rmv "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/cihat/trainlib/rmv.py"
click node_cihat_vol "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/cihat/trainlib/volatility/model.py"
click node_blend "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/blend.py"
click node_blend_fit "https://github.com/unique-func/adialab2026_distilledoracle/blob/main/blend_fit.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_root,node_grid toneBlue
class node_anil_pipeline,node_anil_features,node_anil_mlp toneAmber
class node_tarik_entry,node_tarik_runtime,node_tarik_graph toneMint
class node_cihat_entry,node_cihat_train,node_cihat_models,node_cihat_rmv,node_cihat_vol toneRose
class node_blend,node_blend_fit,node_runner toneIndigo
```

## Components

### Submission entry

- [Root pipeline](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/main.py): `main.py`
- [Grid detector](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/precision_grid.py): `precision_grid.py`

### Anil models

- [Anil pipeline](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/anil/main.py): `anil/main.py`
- [Streaming features](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/anil/features/feature_window_scan.py): `anil/features/feature_window_scan.py`
- [RealMLP model](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/anil/models/pointwise_realmlp/train.py): `anil/models/pointwise_realmlp/train.py`

### Tarik models

- [Tarik entry](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/tarik/main.py): `tarik/main.py`
- [Tarik runtime](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/tarik/sbrt/deployment/current.py): `tarik/sbrt/deployment/current.py`
- [Retained features](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/tarik/sbrt/deployment/retention_graph.py): `tarik/sbrt/deployment/retention_graph.py`

### Cihat models

- [Cihat entry](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/cihat/main.py): `cihat/main.py`
- [Cihat training](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/cihat/run.py): `cihat/run.py`
- [Cihat predictors](https://github.com/unique-func/adialab2026_distilledoracle/tree/main/cihat/submission): `cihat/submission`
- [RMV features](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/cihat/trainlib/rmv.py): `cihat/trainlib/rmv.py`
- [Volatility model](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/cihat/trainlib/volatility/model.py): `cihat/trainlib/volatility/model.py`

### Ensemble output

- [Prediction blend](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/blend.py): `blend.py`
- [Blend fitting](https://github.com/unique-func/adialab2026_distilledoracle/blob/main/blend_fit.py): `blend_fit.py`

### Other components

- **Crunch runner**

## Connections

- Crunch runner → Root pipeline: invokes (evidence: `README.md`)
- Root pipeline → Anil pipeline: trains and infers (evidence: `main.py`)
- Root pipeline → Tarik entry: trains and infers (evidence: `main.py`)
- Root pipeline → Cihat entry: trains and infers (evidence: `main.py`)
- Root pipeline → Grid detector: uses detector (evidence: `main.py`)
- Root pipeline → Prediction blend: combines members (evidence: `main.py`)
- Anil pipeline → Streaming features: builds features (evidence: `anil/main.py`)
- Anil pipeline → RealMLP model: trains model (evidence: `anil/main.py`)
- Tarik entry → Tarik runtime: dispatches training (evidence: `tarik/main.py`)
- Tarik runtime → Retained features: uses feature graph (evidence: `tarik/sbrt/deployment/current.py`)
- Cihat entry → Cihat training: runs training (evidence: `cihat/main.py`)
- Cihat training → RMV features: fits RMV (evidence: `cihat/trainlib/rmv.py`)
- Cihat training → Volatility model: trains volatility
- Cihat entry → Cihat predictors: uses predictors (evidence: `cihat/main.py`)
- Blend fitting → Prediction blend: fits weights (evidence: `README.md`)
- Root pipeline → Blend fitting: fits ensemble (evidence: `README.md`)
