Skip to content

Commit e1c3605

Browse files
micedremeilame-tayebjee
authored andcommitted
docs: Replace mermaid with png fpr architecture diagram
1 parent 51ea3a3 commit e1c3605

File tree

5 files changed

+28
-33
lines changed

5 files changed

+28
-33
lines changed
67.7 KB
Loading

docs/source/architecture/overview.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,8 @@ torchTextClassifiers is a **modular, component-based framework** for text classi
66

77
At its core, torchTextClassifiers processes data through a simple pipeline:
88

9-
```{mermaid}
10-
flowchart LR
11-
TextInput["Text Input"] --> Tokenizer
12-
Tokenizer --> TextEmbedder["Text Embedder"]
13-
14-
CatInput["Categorical Features<br/>(Optional)"] --> CatEmbedder["Categorical Embedder"]
15-
16-
TextEmbedder --> ClassHead["Classification Head"]
17-
CatEmbedder --> ClassHead
18-
19-
ClassHead --> Predictions
20-
21-
style CatInput stroke-dasharray: 5 5
22-
style CatEmbedder stroke-dasharray: 5 5
9+
```{thumbnail} diagrams/ttc_architecture.png
10+
:alt: Package Architecture
2311
```
2412

2513
**Data Flow:**
@@ -195,7 +183,9 @@ The `forward_type` controls how categorical embeddings are combined:
195183

196184
Average all categorical embeddings, then concatenate with text:
197185

198-
![Average and Concatenate](diagrams/avg_concat.png)
186+
```{thumbnail} diagrams/avg_concat.png
187+
:alt: Average and Concatenate
188+
```
199189

200190
```python
201191
forward_type=CategoricalForwardType.AVERAGE_AND_CONCAT
@@ -209,7 +199,9 @@ forward_type=CategoricalForwardType.AVERAGE_AND_CONCAT
209199

210200
Concatenate each categorical embedding separately:
211201

212-
![Full Concatenation](diagrams/full_concat.png)
202+
```{thumbnail} diagrams/full_concat.png
203+
:alt: Full Concatenation
204+
```
213205

214206
```python
215207
forward_type=CategoricalForwardType.CONCATENATE_ALL
@@ -283,8 +275,9 @@ head = ClassificationHead(linear=custom_head)
283275

284276
## Complete Architecture
285277

286-
![Complete Architecture](diagrams/NN.drawio.png)
287-
*Complete model architecture showing all components*
278+
```{thumbnail} diagrams/NN.drawio.png
279+
:alt:
280+
```
288281

289282
### Full Model Assembly
290283

docs/source/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@
3030
'myst_parser', # Parse Markdown files
3131
'sphinx_design', # Modern UI components (cards, grids, etc.)
3232
'nbsphinx', # Render Jupyter notebooks
33-
'sphinxcontrib.mermaid', # Render Mermaid diagrams
33+
'sphinxcontrib.images' # Allow zooming on images
3434
]
3535

36+
37+
3638
templates_path = ['_templates']
3739
exclude_patterns = []
3840

@@ -42,6 +44,7 @@
4244
'.md': 'markdown',
4345
}
4446

47+
4548
# -- Options for HTML output -------------------------------------------------
4649
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
4750

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ docs = [
4545
"ipython>=8.0.0",
4646
"pandoc>=2.0.0",
4747
"linkify-it-py>=2.0.0",
48-
"sphinxcontrib-mermaid>=0.9.0",
48+
"sphinxcontrib-images>=1.0.1"
4949
]
5050

5151
[project.optional-dependencies]

uv.lock

Lines changed: 12 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)