# lincc-frameworks/hyrax architecture

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

- Interactive diagram: https://gitdiagram.com/lincc-frameworks/hyrax
- Repository: https://github.com/lincc-frameworks/hyrax

## Overview

Hyrax is a low-code astronomy ML and unsupervised-discovery framework. A user invokes the CLI or Python API, which runs configured verbs; those verbs coordinate datasets, models, training or inference, and persisted results. The graph also preserves the documented platform’s extension points and the tree’s analysis, visualization, streaming, download, and vector-search capabilities. Some capability links are dashed because their implementation files were not excerpted; edges otherwise reflect the source index or shown calls.

Main entry points: [`src/hyrax/hyrax.py`](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/hyrax.py) (Hyrax API), [`src/hyrax/verbs/engine.py`](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/verbs/engine.py) (Verb engine), [`src/hyrax/datasets/data_provider.py`](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/data_provider.py) (Dataset provider), [`src/hyrax/pytorch_ignite.py`](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/pytorch_ignite.py) (Training runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and configuration"]
  node_cli["Command-line interface<br/>[main.py]"]
  node_api["Hyrax API<br/>[hyrax.py]"]
  node_config["Configuration manager<br/>[config_utils.py]"]
  node_context["Run context<br/>[context.py]"]
  node_registry["Verb registry<br/>[verb_registry.py]"]
  node_engine["Verb engine<br/>[engine.py]"]
end

subgraph group_data["Data and results"]
  node_datasets["Dataset provider<br/>[data_provider.py]"]
  node_dataset_registry["Dataset registry"]
  node_dataset_types["Astronomy datasets"]
  node_stream_provider["Streaming provider"]
  node_cache[("Data cache<br/>[data_cache.py]")]
  node_result_factory["Result factories"]
  node_result_data["Inference results<br/>[result_dataset.py]"]
end

subgraph group_ml["Model execution"]
  node_models["Model registry<br/>[model_registry.py]"]
  node_model_types["Model implementations"]
  node_ignite["Training runtime<br/>[pytorch_ignite.py]"]
  node_splits["Data splitting<br/>[splitting_utils.py]"]
  node_infer["Inference workflows"]
end

subgraph group_analysis["Analysis and discovery"]
  node_reduction["Dimension reduction"]
  node_visualize["Result visualization<br/>[visualize.py]"]
  node_viz3d["3D result viewer"]
  node_vector_verb["Vector database verbs"]
end

subgraph group_integrations["Integrations"]
  node_download["Astronomy downloads<br/>[download.py]"]
  node_vector_factory["Vector DB factory"]
  node_vector_impl[("Vector DB backends")]
  node_plugins["Plugin loading<br/>[plugin_utils.py]"]
  node_trace["Execution tracing<br/>[trace.py]"]
end

node_user(("Hyrax user"))

node_user -->|"invokes"| node_cli
node_user -.->|"configures"| node_api
node_cli -->|"dispatches"| node_api
node_api -->|"loads settings"| node_config
node_api -->|"runs verbs"| node_registry
node_api -->|"starts download"| node_download
node_registry -->|"uses run context"| node_context
node_registry -.->|"registers"| node_engine
node_engine -->|"loads batches"| node_datasets
node_engine -->|"creates writer"| node_result_factory
node_engine -->|"sets up dataset"| node_ignite
node_engine -->|"creates splits"| node_splits
node_engine -->|"loads preparation"| node_plugins
node_datasets -->|"resolves datasets"| node_dataset_registry
node_datasets -->|"uses cache"| node_cache
node_dataset_registry -->|"loads extensions"| node_plugins
node_dataset_types -.->|"registers types"| node_dataset_registry
node_stream_provider -->|"extends provider"| node_datasets
node_ignite -->|"builds loaders"| node_datasets
node_ignite -->|"sets up model"| node_models
node_ignite -->|"writes results"| node_result_factory
node_models -->|"loads extensions"| node_plugins
node_models -.->|"registers models"| node_model_types
node_result_factory -->|"creates dataset"| node_result_data
node_api -.->|"dispatches analysis"| node_reduction
node_api -.->|"dispatches visualization"| node_visualize
node_visualize -.->|"presents results"| node_viz3d
node_api -.->|"dispatches indexing"| node_vector_verb
node_vector_verb -->|"loads inference results"| node_result_data
node_vector_verb -->|"creates database"| node_vector_factory
node_vector_factory -->|"selects backend"| node_vector_impl
node_api -.->|"dispatches inference"| node_infer
node_api -.->|"supports tracing"| node_trace

click node_cli "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax_cli/main.py"
click node_api "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/hyrax.py"
click node_config "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/config_utils.py"
click node_context "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/context.py"
click node_registry "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/verbs/verb_registry.py"
click node_engine "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/verbs/engine.py"
click node_datasets "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/data_provider.py"
click node_dataset_registry "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/dataset_registry.py"
click node_dataset_types "https://github.com/lincc-frameworks/hyrax/tree/main/src/hyrax/datasets"
click node_stream_provider "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/streaming_data_provider.py"
click node_cache "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/data_cache.py"
click node_result_factory "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/result_factories.py"
click node_result_data "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/result_dataset.py"
click node_models "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/models/model_registry.py"
click node_model_types "https://github.com/lincc-frameworks/hyrax/tree/main/src/hyrax/models"
click node_ignite "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/pytorch_ignite.py"
click node_splits "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/splitting_utils.py"
click node_infer "https://github.com/lincc-frameworks/hyrax/tree/main/src/hyrax/verbs"
click node_download "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/download.py"
click node_reduction "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/verbs/reduce_dimensions.py"
click node_visualize "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/verbs/visualize.py"
click node_viz3d "https://github.com/lincc-frameworks/hyrax/tree/main/src/hyrax/3d_viz"
click node_vector_verb "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/verbs/save_to_database.py"
click node_vector_factory "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/vector_dbs/vector_db_factory.py"
click node_vector_impl "https://github.com/lincc-frameworks/hyrax/tree/main/src/hyrax/vector_dbs"
click node_plugins "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/plugin_utils.py"
click node_trace "https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/trace.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_api,node_config,node_context,node_registry,node_engine,node_user toneBlue
class node_datasets,node_dataset_registry,node_dataset_types,node_stream_provider,node_cache,node_result_factory,node_result_data toneAmber
class node_models,node_model_types,node_ignite,node_splits,node_infer toneMint
class node_reduction,node_visualize,node_viz3d,node_vector_verb toneRose
class node_download,node_vector_factory,node_vector_impl,node_plugins,node_trace toneIndigo
```

## Components

### Entry and configuration

- [Command-line interface](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax_cli/main.py): `src/hyrax_cli/main.py`
- [Hyrax API](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/hyrax.py): `src/hyrax/hyrax.py`
- [Configuration manager](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/config_utils.py): `src/hyrax/config_utils.py`
- [Run context](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/context.py): `src/hyrax/context.py`
- [Verb registry](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/verbs/verb_registry.py): `src/hyrax/verbs/verb_registry.py`
- [Verb engine](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/verbs/engine.py): `src/hyrax/verbs/engine.py`

### Data and results

- [Dataset provider](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/data_provider.py): `src/hyrax/datasets/data_provider.py`
- [Dataset registry](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/dataset_registry.py): `src/hyrax/datasets/dataset_registry.py`
- [Astronomy datasets](https://github.com/lincc-frameworks/hyrax/tree/main/src/hyrax/datasets): `src/hyrax/datasets`
- [Streaming provider](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/streaming_data_provider.py): `src/hyrax/datasets/streaming_data_provider.py`
- [Data cache](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/data_cache.py): `src/hyrax/datasets/data_cache.py`
- [Result factories](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/result_factories.py): `src/hyrax/datasets/result_factories.py`
- [Inference results](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/datasets/result_dataset.py): `src/hyrax/datasets/result_dataset.py`

### Model execution

- [Model registry](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/models/model_registry.py): `src/hyrax/models/model_registry.py`
- [Model implementations](https://github.com/lincc-frameworks/hyrax/tree/main/src/hyrax/models): `src/hyrax/models`
- [Training runtime](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/pytorch_ignite.py): `src/hyrax/pytorch_ignite.py`
- [Data splitting](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/splitting_utils.py): `src/hyrax/splitting_utils.py`
- [Inference workflows](https://github.com/lincc-frameworks/hyrax/tree/main/src/hyrax/verbs): `src/hyrax/verbs`

### Analysis and discovery

- [Dimension reduction](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/verbs/reduce_dimensions.py): `src/hyrax/verbs/reduce_dimensions.py`
- [Result visualization](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/verbs/visualize.py): `src/hyrax/verbs/visualize.py`
- [3D result viewer](https://github.com/lincc-frameworks/hyrax/tree/main/src/hyrax/3d_viz): `src/hyrax/3d_viz`
- [Vector database verbs](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/verbs/save_to_database.py): `src/hyrax/verbs/save_to_database.py`

### Integrations

- [Astronomy downloads](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/download.py): `src/hyrax/download.py`
- [Vector DB factory](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/vector_dbs/vector_db_factory.py): `src/hyrax/vector_dbs/vector_db_factory.py`
- [Vector DB backends](https://github.com/lincc-frameworks/hyrax/tree/main/src/hyrax/vector_dbs): `src/hyrax/vector_dbs`
- [Plugin loading](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/plugin_utils.py): `src/hyrax/plugin_utils.py`
- [Execution tracing](https://github.com/lincc-frameworks/hyrax/blob/main/src/hyrax/trace.py): `src/hyrax/trace.py`

### Other components

- **Hyrax user**

## Connections

- Hyrax user → Command-line interface: invokes (evidence: `src/hyrax_cli/main.py`)
- Hyrax user → Hyrax API: configures
- Command-line interface → Hyrax API: dispatches (evidence: `src/hyrax_cli/main.py`)
- Hyrax API → Configuration manager: loads settings (evidence: `src/hyrax/hyrax.py`)
- Hyrax API → Verb registry: runs verbs (evidence: `src/hyrax/hyrax.py`)
- Hyrax API → Astronomy downloads: starts download (evidence: `src/hyrax/hyrax.py`)
- Verb registry → Run context: uses run context (evidence: `src/hyrax/verbs/verb_registry.py`)
- Verb registry → Verb engine: registers (evidence: `src/hyrax/verbs/engine.py`)
- Verb engine → Dataset provider: loads batches (evidence: `src/hyrax/verbs/engine.py`)
- Verb engine → Result factories: creates writer (evidence: `src/hyrax/verbs/engine.py`)
- Verb engine → Training runtime: sets up dataset (evidence: `src/hyrax/verbs/engine.py`)
- Verb engine → Data splitting: creates splits (evidence: `src/hyrax/verbs/engine.py`)
- Verb engine → Plugin loading: loads preparation (evidence: `src/hyrax/verbs/engine.py`)
- Dataset provider → Dataset registry: resolves datasets (evidence: `src/hyrax/datasets/data_provider.py`)
- Dataset provider → Data cache: uses cache (evidence: `src/hyrax/datasets/data_provider.py`)
- Dataset registry → Plugin loading: loads extensions (evidence: `src/hyrax/datasets/dataset_registry.py`)
- Astronomy datasets → Dataset registry: registers types (evidence: `src/hyrax/datasets/inference_dataset.py`)
- Streaming provider → Dataset provider: extends provider (evidence: `src/hyrax/datasets/streaming_data_provider.py`)
- Training runtime → Dataset provider: builds loaders (evidence: `src/hyrax/pytorch_ignite.py`)
- Training runtime → Model registry: sets up model (evidence: `src/hyrax/pytorch_ignite.py`)
- Training runtime → Result factories: writes results (evidence: `src/hyrax/pytorch_ignite.py`)
- Model registry → Plugin loading: loads extensions (evidence: `src/hyrax/models/model_registry.py`)
- Model registry → Model implementations: registers models (evidence: `src/hyrax/models/hyrax_ts2vec.py`)
- Result factories → Inference results: creates dataset (evidence: `src/hyrax/datasets/result_factories.py`)
- Hyrax API → Dimension reduction: dispatches analysis
- Hyrax API → Result visualization: dispatches visualization
- Result visualization → 3D result viewer: presents results
- Hyrax API → Vector database verbs: dispatches indexing
- Vector database verbs → Inference results: loads inference results (evidence: `src/hyrax/verbs/save_to_database.py`)
- Vector database verbs → Vector DB factory: creates database (evidence: `src/hyrax/verbs/save_to_database.py`)
- Vector DB factory → Vector DB backends: selects backend (evidence: `src/hyrax/vector_dbs/vector_db_factory.py`)
- Hyrax API → Inference workflows: dispatches inference (evidence: `src/hyrax/hyrax.py`)
- Hyrax API → Execution tracing: supports tracing
