Skip to content

Commit 8cc0dbf

Browse files
committed
Apply batch of suggestions
1 parent 19b48dc commit 8cc0dbf

11 files changed

Lines changed: 25 additions & 18 deletions

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1515

1616
extensions = ["myst_parser", "sphinx_copybutton"]
17+
myst_heading_anchors = 2
1718

1819
templates_path = ["_templates"]
1920
exclude_patterns = []

docs/source/dashboard.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dashboard
22

33
The dashboard is a Trame application rooted at `dashboard/app.py`.
4-
It discovers experiments from `experiments/synapse-*`, reads each experiment's `config.yaml`, connects to MongoDB, loads MLflow models, and builds the GUI for operator control.
4+
It discovers experiments from `experiments/synapse-*`, reads each experiment's `config.yaml`, connects to MongoDB, loads MLflow models, and builds the GUI used to inspect data and launch jobs.
55

66
## Main Managers
77

@@ -19,7 +19,7 @@ It discovers experiments from `experiments/synapse-*`, reads each experiment's `
1919

2020
- `/`: experiment selection, plots, parameter controls, optimization, ML controls, calibration controls, and errors.
2121
- `/hpc`: NERSC Superfacility API credential and Perlmutter status panel.
22-
- `/chat`: embedded assistant route.
22+
- `/chat`: embedded assistant route for experiment support; currently backed by `https://synapse-chat.lbl.gov/`.
2323

2424
## NERSC Credentials
2525

docs/source/data-model.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The collection name should match `experiment` in `config.yaml`.
1010

1111
## Required Fields
1212

13-
Records should include fields for the configured input and output variable names.
13+
Each record must contain fields for the configured input and output variables, named to match `config.yaml`.
1414

1515
Simulation records may use simulation-space names when `simulation_calibration` maps them back to experimental names.
1616

@@ -21,7 +21,7 @@ The dashboard uses these when present:
2121
- `date`: filtering and hover text for experimental records.
2222
- `scan_number`: hover text.
2323
- `shot_number`: hover text.
24-
- `_id`: hover text and simulation media lookup.
24+
- `_id`: hover text and lookup for linked simulation media, such as MP4 files described in [Simulation Outputs](simulations.md#simulation-outputs).
2525

2626
## Date Filtering
2727

docs/source/deployment.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ From the repository root:
1818
docker build --platform linux/amd64 --output type=image,oci-mediatypes=true -t synapse-ml -f ml.Dockerfile .
1919
```
2020

21+
The two build commands differ only by image tag and Dockerfile.
22+
2123
## Publish Helper
2224

2325
```bash
@@ -29,4 +31,4 @@ python publish_container.py --gui --ml
2931
- Dashboard runs on Spin.
3032
- Training and simulations run on Perlmutter through Superfacility API.
3133
- Images are pushed to `registry.nersc.gov/m558/superfacility`.
32-
- Production changes should be tested carefully before publishing images.
34+
- Before publishing, validate locally and, when possible, against a staging Spin deployment.

docs/source/developer-notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Python code is linted and formatted with Ruff through pre-commit:
88
pre-commit run --files <modified files>
99
```
1010

11-
There is no project `pyproject.toml` or `ruff.toml`; Ruff uses default rules.
11+
Ruff runs with its default rule set; there is no `pyproject.toml` or `ruff.toml` to override it.
1212

1313
## Environments
1414

@@ -18,7 +18,7 @@ There is no project `pyproject.toml` or `ruff.toml`; Ruff uses default rules.
1818

1919
## Testing
2020

21-
There is no broad pytest suite.
21+
The project does not have a full pytest suite.
2222
The main integration check is:
2323

2424
```bash

docs/source/experiment-configuration.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ Simulation launch uses:
4646
simulation = alpha * (experimental - beta)
4747
```
4848

49+
These are inverse conversions: display maps simulation to experimental units, while launch maps dashboard parameters back to simulation units.
50+
4951
## Add an Experiment
5052

5153
1. Clone or create `experiments/synapse-<experiment>/`.
5254
2. Add `config.yaml`.
53-
3. Ensure MongoDB records match the configured names.
55+
3. Ensure MongoDB fields match the configured input and output variable names.
5456
4. Add `simulation_scripts/` only if dashboard launch is needed.
5557
5. Train and register a model if dashboard predictions are needed.

docs/source/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Getting Started
22

3-
Use the lock files for normal setup.
3+
For a reproducible install, use `environment-lock.yml` rather than the unpinned `environment.yml`.
44

55
## Dashboard
66

@@ -37,4 +37,4 @@ python train_model.py --test --config_file ../experiments/synapse-bella-ip2/conf
3737

3838
- `SF_DB_HOST`: MongoDB host for the dashboard.
3939
- `SF_DB_READONLY_PASSWORD`: read-only MongoDB password.
40-
- `AM_SC_API_KEY`: AmSC MLflow API key when the config uses AmSC.
40+
- `AM_SC_API_KEY`: American Science Cloud MLflow API key when the config uses that service.

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Welcome to the Synapse documentation!
1111
overview
1212
getting-started
1313
dashboard
14-
experiment-configuration
1514
data-model
15+
experiment-configuration
1616
simulations
1717
ml-training
1818
deployment

docs/source/ml-training.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Use `--model` with one of:
99

1010
- `GP`: Gaussian Process.
1111
- `NN`: single neural network.
12-
- `ensemble_NN`: ensemble of 10 neural networks.
12+
- `ensemble_NN`: ensemble neural network. The current ensemble size is defined in `train_nn_ensemble()` in `ml/train_model.py`.
1313

1414
## Command
1515

@@ -24,7 +24,7 @@ Use `--test` to skip MLflow registration.
2424
1. Load config, variables, database records, and MLflow settings.
2525
2. Build calibration and normalization transforms.
2626
3. Train on simulation data.
27-
4. Train calibration on experimental data when available.
27+
4. Train [calibration](experiment-configuration.md#calibration) on experimental data when available.
2828
5. Build a `lume-model`.
2929
6. Register to MLflow unless `--test` is set.
3030

docs/source/overview.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Overview
22

3-
Synapse is a modular framework for building digital twin components that connect experimental data, simulation data, and machine learning models.
3+
Synapse is a modular framework for connecting experimental data, simulation data, and machine learning models for digital twin workflows.
44

5-
The repository has three main parts:
5+
The main source areas are:
66

77
- `dashboard/`: a Trame web application for exploring experiments, simulations, model predictions, optimization, calibration, and NERSC job controls.
88
- `ml/`: model training code for Gaussian Process, single Neural Network, and Neural Network ensemble models.
99
- `experiments/`: experiment-specific configuration and scripts, usually cloned from private repositories.
10+
- `tests/`: integration checks for the ML pipeline.
11+
- `docs/`: Sphinx documentation source.
1012

1113
The typical workflow is:
1214

@@ -27,7 +29,7 @@ Synapse currently assumes these external services:
2729
- NERSC Superfacility API for Perlmutter jobs.
2830
- NERSC container registry for dashboard and ML images.
2931

30-
## Map
32+
## Repository Map
3133

3234
```text
3335
dashboard/ Trame GUI and dashboard managers

0 commit comments

Comments
 (0)