# 0renay0/dataset_tr architecture

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

- Interactive diagram: https://gitdiagram.com/0renay0/dataset_tr
- Repository: https://github.com/0renay0/dataset_tr

## Overview

DataSet_TR models thermal-runaway scenarios and derives dataset labels. The evidenced workflow is configurable ODE dynamics, output postprocessing, then five-signal runaway evaluation and fault-aware label construction; the README also describes majority voting and criterion audit fields. Simulation orchestration and file-level dataset generation are not shown, so no edges are inferred for them.

Main entry points: [`src/labeling/criteria.py`](https://github.com/0renay0/dataset_tr/blob/main/src/labeling/criteria.py) (Legacy criteria), [`configs/simulation_config.py`](https://github.com/0renay0/dataset_tr/blob/main/configs/simulation_config.py) (Simulation parameters), [`src/labeling/signal_utils.py`](https://github.com/0renay0/dataset_tr/blob/main/src/labeling/signal_utils.py) (Signal helpers), [`src/labeling/runaway_criteria.py`](https://github.com/0renay0/dataset_tr/blob/main/src/labeling/runaway_criteria.py) (Runaway vote)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["Scenario simulation"]
  node_config["Simulation parameters"]
  node_ode["ODE dynamics<br/>[ode_model.py]"]
  node_postprocess["Simulation outputs<br/>[postprocess.py]"]
end

subgraph group_labeling["Runaway labeling"]
  node_criteria["Legacy criteria<br/>[criteria.py]"]
  node_runaway["Runaway vote"]
  node_labelbuilder["Fault-aware labels<br/>[label_builder.py]"]
end

subgraph group_signals["Signal utilities"]
  node_features["Dynamic features<br/>[features.py]"]
  node_signalutils["Signal helpers<br/>[signal_utils.py]"]
end

node_engineer(("Dataset user"))

node_ode -->|"reads parameters"| node_config
node_postprocess -->|"reads parameters"| node_config
node_criteria -->|"reads parameters"| node_config
node_runaway -->|"uses signal readers"| node_criteria
node_labelbuilder -->|"evaluates criteria"| node_runaway
node_signalutils -->|"re-exports helpers"| node_criteria
node_signalutils -->|"re-exports features"| node_features

click node_config "https://github.com/0renay0/dataset_tr/blob/main/configs/simulation_config.py"
click node_ode "https://github.com/0renay0/dataset_tr/blob/main/src/simulation/ode_model.py"
click node_postprocess "https://github.com/0renay0/dataset_tr/blob/main/src/simulation/postprocess.py"
click node_criteria "https://github.com/0renay0/dataset_tr/blob/main/src/labeling/criteria.py"
click node_runaway "https://github.com/0renay0/dataset_tr/blob/main/src/labeling/runaway_criteria.py"
click node_labelbuilder "https://github.com/0renay0/dataset_tr/blob/main/src/labeling/label_builder.py"
click node_features "https://github.com/0renay0/dataset_tr/blob/main/src/labeling/features.py"
click node_signalutils "https://github.com/0renay0/dataset_tr/blob/main/src/labeling/signal_utils.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_config,node_ode,node_postprocess,node_engineer toneBlue
class node_criteria,node_runaway,node_labelbuilder toneAmber
class node_features,node_signalutils toneMint
```

## Components

### Scenario simulation

- [Simulation parameters](https://github.com/0renay0/dataset_tr/blob/main/configs/simulation_config.py): `configs/simulation_config.py`
- [ODE dynamics](https://github.com/0renay0/dataset_tr/blob/main/src/simulation/ode_model.py): `src/simulation/ode_model.py`
- [Simulation outputs](https://github.com/0renay0/dataset_tr/blob/main/src/simulation/postprocess.py): `src/simulation/postprocess.py`

### Runaway labeling

- [Legacy criteria](https://github.com/0renay0/dataset_tr/blob/main/src/labeling/criteria.py): `src/labeling/criteria.py`
- [Runaway vote](https://github.com/0renay0/dataset_tr/blob/main/src/labeling/runaway_criteria.py): `src/labeling/runaway_criteria.py`
- [Fault-aware labels](https://github.com/0renay0/dataset_tr/blob/main/src/labeling/label_builder.py): `src/labeling/label_builder.py`

### Signal utilities

- [Dynamic features](https://github.com/0renay0/dataset_tr/blob/main/src/labeling/features.py): `src/labeling/features.py`
- [Signal helpers](https://github.com/0renay0/dataset_tr/blob/main/src/labeling/signal_utils.py): `src/labeling/signal_utils.py`

### Other components

- **Dataset user**

## Connections

- ODE dynamics → Simulation parameters: reads parameters (evidence: `src/simulation/ode_model.py`)
- Simulation outputs → Simulation parameters: reads parameters (evidence: `src/simulation/postprocess.py`)
- Legacy criteria → Simulation parameters: reads parameters (evidence: `src/labeling/criteria.py`)
- Runaway vote → Legacy criteria: uses signal readers (evidence: `src/labeling/runaway_criteria.py`)
- Fault-aware labels → Runaway vote: evaluates criteria (evidence: `src/labeling/label_builder.py`)
- Signal helpers → Legacy criteria: re-exports helpers (evidence: `src/labeling/signal_utils.py`)
- Signal helpers → Dynamic features: re-exports features (evidence: `src/labeling/signal_utils.py`)
