# franco7scala/playitstraight architecture

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

- Interactive diagram: https://gitdiagram.com/franco7scala/playitstraight
- Repository: https://github.com/franco7scala/playitstraight

## Overview

Play It Straight is a research training application for reducing training-data use and energy while maintaining target accuracy. The principal workflow is dataset/model configuration, repeated-random-sampling boot training, active-learning query cycles, then model evaluation and emissions tracking. The graph preserves the documented comparison approaches and the implemented selection-method and model families. Some links to algorithm variants and comparison runs are documented or inferred from the entry point’s imports, but their full dispatch logic was not sampled.

Main entry points: [`src/play_it_stright/main_play_it_straight.py`](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/main_play_it_straight.py) (Experiment runner), [`src/play_it_stright/methods`](https://github.com/franco7scala/playitstraight/tree/main/src/play_it_stright/methods) (Selection methods), [`src/play_it_stright/methods/kcentergreedy.py`](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/kcentergreedy.py) (K-center greedy), [`src/play_it_stright/nets`](https://github.com/franco7scala/playitstraight/tree/main/src/play_it_stright/nets) (Network architectures)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Training workflow"]
  node_entry["Experiment runner"]
  node_rs2["RS2 boot training<br/>[rs2.py]"]
  node_activecycles["Query cycles"]
  node_evaluation["Model evaluation<br/>[utils.py]"]
  node_emissions["Emissions tracking"]
end

subgraph group_data["Data and datasets"]
  node_datasets["Dataset loaders"]
  node_imagenet30["ImageNet30 loader<br/>[imagenet30.py]"]
  node_augment["RandAugment<br/>[randaugment.py]"]
end

subgraph group_selection["Active selection"]
  node_selection["Selection methods"]
  node_uncertainty["Uncertainty ranking<br/>[uncertainty.py]"]
  node_improved["Improved uncertainty"]
  node_gtknown["Known-label uncertainty"]
  node_kcenter["K-center greedy<br/>[kcentergreedy.py]"]
  node_submodular["Submodular selection"]
  node_optimizer["Submodular optimizer"]
end

subgraph group_models["Model architectures"]
  node_models["Network architectures"]
  node_recorder["Embedding recorder<br/>[recorder.py]"]
end

subgraph group_support["Training support"]
  node_arguments["Experiment arguments<br/>[arguments.py]"]
  node_training["Train utilities<br/>[utils.py]"]
  node_logging["Run logging<br/>[support.py]"]
end

node_researcher(("Experiment runner"))

node_researcher -->|"configures and runs"| node_entry
node_entry -->|"reads options"| node_arguments
node_entry -->|"loads dataset"| node_datasets
node_entry -->|"creates network"| node_models
node_entry -->|"configures training"| node_training
node_entry -->|"splits training data"| node_rs2
node_entry -->|"runs query cycles"| node_activecycles
node_entry -->|"tracks emissions"| node_emissions
node_entry -->|"evaluates model"| node_evaluation
node_activecycles -.->|"queries samples"| node_selection
node_selection -->|"offers strategy"| node_uncertainty
node_selection -->|"offers strategy"| node_improved
node_selection -->|"offers strategy"| node_gtknown
node_selection -->|"offers strategy"| node_kcenter
node_kcenter -->|"inherits base"| node_selection
node_kcenter -.->|"uses utilities"| node_submodular
node_submodular -.->|"optimizes selections"| node_optimizer
node_imagenet30 -->|"applies augmentation"| node_augment
node_models -->|"records embeddings"| node_recorder
node_kcenter -->|"reads embeddings"| node_models
node_entry -.->|"reports progress"| node_logging
node_entry -.->|"supports AL approach"| node_selection

click node_entry "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/main_play_it_straight.py"
click node_rs2 "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/support/rs2.py"
click node_activecycles "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/main_play_it_straight.py"
click node_evaluation "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/support/utils.py"
click node_emissions "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/main_play_it_straight.py"
click node_datasets "https://github.com/franco7scala/playitstraight/tree/main/src/play_it_stright/datasets"
click node_imagenet30 "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/datasets/imagenet30.py"
click node_augment "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/datasets/randaugment.py"
click node_selection "https://github.com/franco7scala/playitstraight/tree/main/src/play_it_stright/methods"
click node_uncertainty "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/uncertainty.py"
click node_improved "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/improved_uncertainty.py"
click node_gtknown "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/gtknown_uncertainty.py"
click node_kcenter "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/kcentergreedy.py"
click node_submodular "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/methods_utils/submodular_function.py"
click node_optimizer "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/methods_utils/submodular_optimizer.py"
click node_models "https://github.com/franco7scala/playitstraight/tree/main/src/play_it_stright/nets"
click node_recorder "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/nets/nets_utils/recorder.py"
click node_arguments "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/support/arguments.py"
click node_training "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/support/utils.py"
click node_logging "https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/support/support.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_entry,node_rs2,node_activecycles,node_evaluation,node_emissions toneBlue
class node_datasets,node_imagenet30,node_augment toneAmber
class node_selection,node_uncertainty,node_improved,node_gtknown,node_kcenter,node_submodular,node_optimizer toneMint
class node_models,node_recorder toneRose
class node_arguments,node_training,node_logging,node_researcher toneIndigo
```

## Components

### Training workflow

- [Experiment runner](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/main_play_it_straight.py): `src/play_it_stright/main_play_it_straight.py`
- [RS2 boot training](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/support/rs2.py): `src/play_it_stright/support/rs2.py`
- [Query cycles](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/main_play_it_straight.py): `src/play_it_stright/main_play_it_straight.py`
- [Model evaluation](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/support/utils.py): `src/play_it_stright/support/utils.py`
- [Emissions tracking](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/main_play_it_straight.py): `src/play_it_stright/main_play_it_straight.py`

### Data and datasets

- [Dataset loaders](https://github.com/franco7scala/playitstraight/tree/main/src/play_it_stright/datasets): `src/play_it_stright/datasets`
- [ImageNet30 loader](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/datasets/imagenet30.py): `src/play_it_stright/datasets/imagenet30.py`
- [RandAugment](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/datasets/randaugment.py): `src/play_it_stright/datasets/randaugment.py`

### Active selection

- [Selection methods](https://github.com/franco7scala/playitstraight/tree/main/src/play_it_stright/methods): `src/play_it_stright/methods`
- [Uncertainty ranking](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/uncertainty.py): `src/play_it_stright/methods/uncertainty.py`
- [Improved uncertainty](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/improved_uncertainty.py): `src/play_it_stright/methods/improved_uncertainty.py`
- [Known-label uncertainty](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/gtknown_uncertainty.py): `src/play_it_stright/methods/gtknown_uncertainty.py`
- [K-center greedy](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/kcentergreedy.py): `src/play_it_stright/methods/kcentergreedy.py`
- [Submodular selection](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/methods_utils/submodular_function.py): `src/play_it_stright/methods/methods_utils/submodular_function.py`
- [Submodular optimizer](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/methods/methods_utils/submodular_optimizer.py): `src/play_it_stright/methods/methods_utils/submodular_optimizer.py`

### Model architectures

- [Network architectures](https://github.com/franco7scala/playitstraight/tree/main/src/play_it_stright/nets): `src/play_it_stright/nets`
- [Embedding recorder](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/nets/nets_utils/recorder.py): `src/play_it_stright/nets/nets_utils/recorder.py`

### Training support

- [Experiment arguments](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/support/arguments.py): `src/play_it_stright/support/arguments.py`
- [Train utilities](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/support/utils.py): `src/play_it_stright/support/utils.py`
- [Run logging](https://github.com/franco7scala/playitstraight/blob/main/src/play_it_stright/support/support.py): `src/play_it_stright/support/support.py`

### Other components

- **Experiment runner**

## Connections

- Experiment runner → Experiment runner: configures and runs
- Experiment runner → Experiment arguments: reads options (evidence: `src/play_it_stright/main_play_it_straight.py`)
- Experiment runner → Dataset loaders: loads dataset (evidence: `src/play_it_stright/main_play_it_straight.py`)
- Experiment runner → Network architectures: creates network (evidence: `src/play_it_stright/main_play_it_straight.py`)
- Experiment runner → Train utilities: configures training (evidence: `src/play_it_stright/main_play_it_straight.py`)
- Experiment runner → RS2 boot training: splits training data (evidence: `src/play_it_stright/main_play_it_straight.py`)
- Experiment runner → Query cycles: runs query cycles (evidence: `src/play_it_stright/main_play_it_straight.py`)
- Experiment runner → Emissions tracking: tracks emissions (evidence: `src/play_it_stright/main_play_it_straight.py`)
- Experiment runner → Model evaluation: evaluates model (evidence: `src/play_it_stright/main_play_it_straight.py`)
- Query cycles → Selection methods: queries samples (evidence: `src/play_it_stright/main_play_it_straight.py`)
- Selection methods → Uncertainty ranking: offers strategy (evidence: `src/play_it_stright/methods/__init__.py`)
- Selection methods → Improved uncertainty: offers strategy (evidence: `src/play_it_stright/methods/__init__.py`)
- Selection methods → Known-label uncertainty: offers strategy (evidence: `src/play_it_stright/methods/__init__.py`)
- Selection methods → K-center greedy: offers strategy (evidence: `src/play_it_stright/methods/__init__.py`)
- K-center greedy → Selection methods: inherits base (evidence: `src/play_it_stright/methods/kcentergreedy.py`)
- K-center greedy → Submodular selection: uses utilities
- Submodular selection → Submodular optimizer: optimizes selections
- ImageNet30 loader → RandAugment: applies augmentation (evidence: `src/play_it_stright/datasets/imagenet30.py`)
- Network architectures → Embedding recorder: records embeddings (evidence: `src/play_it_stright/nets/resnet.py`)
- K-center greedy → Network architectures: reads embeddings (evidence: `src/play_it_stright/methods/kcentergreedy.py`)
- Experiment runner → Run logging: reports progress (evidence: `src/play_it_stright/main_play_it_straight.py`)
- Experiment runner → Selection methods: supports AL approach (evidence: `src/play_it_stright/main_play_it_straight.py`)
