# srujanasri2008/ml-project architecture

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

- Interactive diagram: https://gitdiagram.com/srujanasri2008/ml-project
- Repository: https://github.com/srujanasri2008/ml-project

## Overview

This research application trains a SAC policy to allocate power, NOMA splits, and airtime while semantic tasks move through service, completion, or deadline expiry. The main workflow runs from CLI configuration through training, then evaluates SAC against allocation baselines and produces plots; an optional Streamlit dashboard is also documented. The graph includes every indexed core module. Some subsystem internals and dashboard data wiring were not shown, so those links are omitted rather than inferred.

Main entry points: [`src/semantic_noma/cli.py`](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/cli.py) (Experiment CLI), [`src/semantic_noma/environment.py`](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/environment.py) (Gym environment), [`src/semantic_noma/evaluation.py`](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/evaluation.py) (Policy evaluation), [`src/semantic_noma/config.py`](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/config.py) (Configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Experiment entry"]
  node_cli["Experiment CLI<br/>[cli.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_default_config["Default settings<br/>[default.json]"]
  node_smoke_config["Smoke settings<br/>[smoke_test.json]"]
end

subgraph group_simulation["Wireless simulation"]
  node_environment["Gym environment<br/>[environment.py]"]
  node_channel["Channel model<br/>[channel_model.py]"]
  node_tasks["Semantic task lifecycle<br/>[task_model.py]"]
  node_allocator["Resource allocator"]
  node_wireless_math["Wireless calculations<br/>[wireless_math.py]"]
end

subgraph group_learning["Policy learning"]
  node_training["SAC training<br/>[training.py]"]
  node_callbacks["Training callbacks<br/>[callbacks.py]"]
  node_baselines["Allocation baselines<br/>[baselines.py]"]
end

subgraph group_analysis["Evaluation and reporting"]
  node_evaluation["Policy evaluation<br/>[evaluation.py]"]
  node_metrics["Episode metrics<br/>[metrics.py]"]
  node_plotting["Result plotting<br/>[plotting.py]"]
end

subgraph group_interface["Optional interface"]
  node_dashboard["Interactive dashboard<br/>[app.py]"]
end

node_user(("Researcher"))

node_user -->|"runs"| node_cli
node_cli -->|"loads"| node_config
node_config -.->|"reads"| node_default_config
node_config -.->|"reads"| node_smoke_config
node_cli -->|"starts training"| node_training
node_cli -->|"runs evaluation"| node_evaluation
node_cli -->|"generates plots"| node_plotting
node_training -->|"creates"| node_environment
node_training -->|"registers"| node_callbacks
node_environment -->|"samples gains"| node_channel
node_environment -->|"updates tasks"| node_tasks
node_environment -->|"allocates resources"| node_allocator
node_allocator -->|"computes rates"| node_wireless_math
node_evaluation -->|"steps through"| node_environment
node_evaluation -->|"compares policies"| node_baselines
node_evaluation -->|"computes fairness"| node_metrics
node_user -.->|"opens"| node_dashboard

click node_cli "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/cli.py"
click node_config "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/config.py"
click node_default_config "https://github.com/srujanasri2008/ml-project/blob/main/configs/default.json"
click node_smoke_config "https://github.com/srujanasri2008/ml-project/blob/main/configs/smoke_test.json"
click node_environment "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/environment.py"
click node_channel "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/channel_model.py"
click node_tasks "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/task_model.py"
click node_allocator "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/resource_allocator.py"
click node_wireless_math "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/wireless_math.py"
click node_training "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/training.py"
click node_callbacks "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/callbacks.py"
click node_baselines "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/baselines.py"
click node_evaluation "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/evaluation.py"
click node_metrics "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/metrics.py"
click node_plotting "https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/plotting.py"
click node_dashboard "https://github.com/srujanasri2008/ml-project/blob/main/dashboard/app.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_cli,node_config,node_default_config,node_smoke_config toneBlue
class node_environment,node_channel,node_tasks,node_allocator,node_wireless_math toneAmber
class node_training,node_callbacks,node_baselines toneMint
class node_evaluation,node_metrics,node_plotting toneRose
class node_dashboard,node_user toneIndigo
```

## Components

### Experiment entry

- [Experiment CLI](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/cli.py): `src/semantic_noma/cli.py`
- [Configuration](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/config.py): `src/semantic_noma/config.py`
- [Default settings](https://github.com/srujanasri2008/ml-project/blob/main/configs/default.json): `configs/default.json`
- [Smoke settings](https://github.com/srujanasri2008/ml-project/blob/main/configs/smoke_test.json): `configs/smoke_test.json`

### Wireless simulation

- [Gym environment](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/environment.py): `src/semantic_noma/environment.py`
- [Channel model](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/channel_model.py): `src/semantic_noma/channel_model.py`
- [Semantic task lifecycle](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/task_model.py): `src/semantic_noma/task_model.py`
- [Resource allocator](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/resource_allocator.py): `src/semantic_noma/resource_allocator.py`
- [Wireless calculations](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/wireless_math.py): `src/semantic_noma/wireless_math.py`

### Policy learning

- [SAC training](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/training.py): `src/semantic_noma/training.py`
- [Training callbacks](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/callbacks.py): `src/semantic_noma/callbacks.py`
- [Allocation baselines](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/baselines.py): `src/semantic_noma/baselines.py`

### Evaluation and reporting

- [Policy evaluation](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/evaluation.py): `src/semantic_noma/evaluation.py`
- [Episode metrics](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/metrics.py): `src/semantic_noma/metrics.py`
- [Result plotting](https://github.com/srujanasri2008/ml-project/blob/main/src/semantic_noma/plotting.py): `src/semantic_noma/plotting.py`

### Optional interface

- [Interactive dashboard](https://github.com/srujanasri2008/ml-project/blob/main/dashboard/app.py): `dashboard/app.py`

### Other components

- **Researcher**

## Connections

- Researcher → Experiment CLI: runs (evidence: `README.md`)
- Experiment CLI → Configuration: loads (evidence: `src/semantic_noma/cli.py`)
- Configuration → Default settings: reads
- Configuration → Smoke settings: reads
- Experiment CLI → SAC training: starts training (evidence: `src/semantic_noma/cli.py`)
- Experiment CLI → Policy evaluation: runs evaluation (evidence: `src/semantic_noma/cli.py`)
- Experiment CLI → Result plotting: generates plots (evidence: `src/semantic_noma/cli.py`)
- SAC training → Gym environment: creates (evidence: `src/semantic_noma/training.py`)
- SAC training → Training callbacks: registers (evidence: `src/semantic_noma/training.py`)
- Gym environment → Channel model: samples gains (evidence: `src/semantic_noma/environment.py`)
- Gym environment → Semantic task lifecycle: updates tasks (evidence: `src/semantic_noma/environment.py`)
- Gym environment → Resource allocator: allocates resources (evidence: `src/semantic_noma/environment.py`)
- Resource allocator → Wireless calculations: computes rates (evidence: `src/semantic_noma/resource_allocator.py`)
- Policy evaluation → Gym environment: steps through (evidence: `src/semantic_noma/evaluation.py`)
- Policy evaluation → Allocation baselines: compares policies (evidence: `src/semantic_noma/evaluation.py`)
- Policy evaluation → Episode metrics: computes fairness (evidence: `src/semantic_noma/evaluation.py`)
- Researcher → Interactive dashboard: opens (evidence: `README.md`)
