Skip to content

Commit 4af1f7b

Browse files
authored
Add mkdocs (#1)
* Add barebone setup for mkdocs * Move resources under docs * Copy readme into docs index * Add notebooks and example notebook * Add high-level trainers * Add callbacks to high-level API * Add low-level utilities * Add sample data * Add base classes to documentation * Add favicon * Placeholder for background markdowns
1 parent 9f10a2f commit 4af1f7b

28 files changed

+601
-2
lines changed

.github/workflows/build_docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
permissions:
6+
contents: write
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Configure Git Credentials
13+
run: |
14+
git config user.name github-actions[bot]
15+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: 3.x
19+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install .
25+
python -m pip install -r docs/requirements.txt
26+
27+
- uses: actions/cache@v4
28+
with:
29+
key: mkdocs-material-${{ env.cache_id }}
30+
path: .cache
31+
restore-keys: |
32+
mkdocs-material-
33+
- run: pip install mkdocs-material
34+
- run: mkdocs gh-deploy --force

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<h1 align="center">
2-
<img src="img/trainax_logo.png" width="400">
2+
<img src="docs/imgs/trainax_logo.png" width="400">
33
<br>
44
Trainax
55
<br>
@@ -19,7 +19,7 @@
1919
</p>
2020

2121
<p align="center">
22-
<img src="img/sample_two_step_supervised.svg" width="400">
22+
<img src="docs/imgs/sample_two_step_supervised.svg" width="400">
2323
</p>
2424

2525
## Installation

docs/api/callbacks.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Callbacks
2+
3+
::: trainax.callback.SaveNetwork
4+
options:
5+
members:
6+
- __init__
7+
8+
---
9+
10+
::: trainax.callback.GetNetwork
11+
options:
12+
members:
13+
- __init__
14+
15+
---
16+
17+
::: trainax.callback.WeightNorm
18+
options:
19+
members:
20+
- __init__
21+
22+
---
23+
24+
::: trainax.callback.Loss
25+
options:
26+
members:
27+
- __init__
28+
29+
---
30+
31+
::: trainax.callback.GradNorm
32+
options:
33+
members:
34+
- __init__
35+
36+
---
37+
38+
::: trainax.callback.CompositeCallback
39+
options:
40+
members:
41+
- __init__
42+
43+
---
44+
45+
::: trainax.callback.BaseCallback
46+
options:
47+
members:
48+
- __init__

docs/api/configuration/base.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Base Configuration
2+
3+
::: trainax.configuration.BaseConfiguration
4+
options:
5+
members:
6+
- __init__
7+
- __call__

docs/api/configuration/composite.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Composite Configuration
2+
3+
::: trainax.configuration.Composite
4+
options:
5+
members:
6+
- __init__
7+
- __call__
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Diverted-Chain
2+
3+
::: trainax.configuration.DivertedChainBranchOne
4+
options:
5+
members:
6+
- __init__
7+
- __call__
8+
9+
---
10+
11+
::: trainax.configuration.DivertedChain
12+
options:
13+
members:
14+
- __init__
15+
- __call__

docs/api/configuration/mix_chain.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Mixed-Chain
2+
3+
::: trainax.configuration.MixChainPostPhysics
4+
options:
5+
members:
6+
- __init__
7+
- __call__

docs/api/configuration/residuum.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Residuum
2+
3+
::: trainax.configuration.Residuum
4+
options:
5+
members:
6+
- __init__
7+
- __call__

docs/api/configuration/supervised.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Supervised
2+
3+
::: trainax.configuration.Supervised
4+
options:
5+
members:
6+
- __init__
7+
- __call__

docs/api/general_trainer.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# General Trainer
2+
3+
::: trainax.GeneralTrainer
4+
options:
5+
members:
6+
- __init__
7+
- __call__

docs/api/loss.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Losses
2+
3+
::: trainax.loss.MSELoss
4+
options:
5+
members:
6+
- __init__
7+
- __call__
8+
9+
---
10+
11+
::: trainax.loss.Normalized_MSELoss
12+
options:
13+
members:
14+
- __init__
15+
- __call__
16+
17+
---
18+
19+
::: trainax.loss.MAELoss
20+
options:
21+
members:
22+
- __init__
23+
- __call__
24+
25+
---
26+
27+
::: trainax.loss.Normalized_MAELoss
28+
options:
29+
members:
30+
- __init__
31+
- __call__
32+
33+
---
34+
35+
::: trainax.loss.BaseLoss
36+
options:
37+
members:
38+
- __init__
39+
- __call__

docs/api/sample_data.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Sample Data
2+
3+
::: trainax.sample_data.advection_1d_periodic

docs/api/trainer/diverted_chain.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Diverted Chain
2+
3+
::: trainax.trainer.DivertedChainBranchOneTrainer
4+
options:
5+
members:
6+
- __init__
7+
- __call__

docs/api/trainer/mixed_chain.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Mixed-Chain
2+
3+
Placeholder for now

docs/api/trainer/residuum.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Residuum
2+
3+
::: trainax.trainer.ResiduumTrainer
4+
options:
5+
members:
6+
- __init__
7+
- __call__

docs/api/trainer/supervised.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Supervised Trainer
2+
3+
::: trainax.trainer.SupervisedTrainer
4+
options:
5+
members:
6+
- __init__
7+
- __call__

docs/api/trajectory_mixing.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Trajectory Mixing
2+
3+
::: trainax.TrajectorySubStacker
4+
options:
5+
members:
6+
- __init__
7+
- __call__
8+
9+
---
10+
11+
::: trainax.PermutationMixer
12+
options:
13+
members:
14+
- __init__
15+
- __call__
16+
17+
<!-- ---
18+
19+
::: trainax.TrajectoryMixer
20+
options:
21+
members:
22+
- __init__
23+
- __call__ -->
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# On the relation between diverted chain and residuum
2+
3+
TODO

docs/examples/using_callbacks.ipynb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# Placeholder for now"
8+
]
9+
},
10+
{
11+
"cell_type": "code",
12+
"execution_count": null,
13+
"metadata": {},
14+
"outputs": [],
15+
"source": []
16+
}
17+
],
18+
"metadata": {
19+
"language_info": {
20+
"name": "python"
21+
}
22+
},
23+
"nbformat": 4,
24+
"nbformat_minor": 2
25+
}

docs/imgs/syringe-solid.png

1.37 KB
Loading
File renamed without changes.

0 commit comments

Comments
 (0)