diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..b4c4b458677943ac137263df0bb1ea808c7a8629 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 NoahH72 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 16eb06471fb11d770343677c615ab2a88151e9ae..cb94134528e532e384246b71e9eb8a182b4d9cf5 100644 --- a/README.md +++ b/README.md @@ -7,165 +7,151 @@ tags: - plasma-physics - tokamak - diii-d - - state-space-model - mamba - - time-series - - real-time --- -# fuse29 — Mamba-2 pedestal predictor for DIII-D +# FUSE-EFIT (in era), ONNX -A 29-input, 6-layer Mamba-2 state-space model that predicts nine pedestal -quantities at ρ_tor = 0.85 from DIII-D actuator settings, at 20 Hz, with a -strictly causal O(1)-per-tick inference path suitable for real-time control. +A 20 Hz, strictly causal model of the DIII-D plasma edge, driven by the heating, fuelling and field +actuators, the measured plasma current, the loop voltage and the EFIT01 boundary shape. Physical units +in, physical units out. Code, documentation and the input contract: https://github.com/NoahH72/FUSE-Pedestal-Predictor-Mamba-ONNX +(`docs/EXPORT.md`, `docs/INPUT_CONTRACT.md`, `MODEL_CARD.md`). -Packaged as two ONNX graphs with normalisation baked in: **raw physical units -in, physical units out.** +## Two forms, one calling convention -| | | -|---|---| -| Parameters | 11,254,425 | -| Architecture | Mamba-2 (SSD), 6 layers, d_model 512, d_state 128 | -| Inputs | 29 actuator channels, physical units | -| Outputs | 9 heads, physical units | -| Cadence | 20 Hz (50 ms) | -| Precision | float32 | -| ONNX opset | 17 | -| Step latency | ~2.9 ms/tick, CPU, batch 1 | -| License | MIT | +| form | what it is | networks per tick | ONNX files | step call, 1 thread | step call, 8 threads | +|---|---|---:|---:|---|---| +| `single` | replicate 0 of the in-era finals (seed 100), the frozen delivered network | 1 | 184 MB | 4.87 ms (99th percentile 5.08 ms) | 1.95 ms (99th percentile 2.00 ms) | +| `averaged` | the eight in-era finals (seeds 100-107); the mean of their raw outputs at every tick | 8 | 1468 MB | 56.33 ms (99th percentile 59.45 ms) | 18.25 ms (99th percentile 18.60 ms) | -## Intended use +Timing: Intel(R) Xeon(R) CPU Max 9470C, onnxruntime 1.30.0, CPU, batch 1. The control cycle is 50 ms per tick. The two forms take and return the same tensors +with the same names, shapes and units; only the recurrent state is larger for `averaged` +(19.9 MB per shot against 2.5 MB). +A host switches form by choosing a folder. -Predicting pedestal density, temperature, rotation, heights and locations from -the actuator request, inside FUSE or an equivalent DIII-D control or analysis -pipeline. The step graph is designed for the 50 ms control cycle; the sequence -graph is for offline scoring and replay. - -**Not** intended for other machines, other radial locations, or as a -safety-critical interlock. It has no uncertainty estimate and no -out-of-distribution detector. - -## Quickstart +## Files -```bash -pip install numpy onnxruntime +``` +era/single/fuse_efit_single_step.onnx one 50 ms tick per call, state in and out +era/single/fuse_efit_single_sequence.onnx one window of 256 ticks +era/averaged/fuse_efit_averaged_step.onnx +era/averaged/fuse_efit_averaged_sequence.onnx +era/
/model_config.json the input and output contract, machine-readable +era//norms.json the statistics baked into the graphs +era//input_ranges.json training ranges per channel, for a units check +era//provenance.json source checkpoints with sha256, code identity, versions +SHA256SUMS sha256sum -c SHA256SUMS ``` -```python -from fuse29.runtime import Fuse29Predictor - -predictor = Fuse29Predictor.from_pretrained("SCS-Lab/FUSE29-Pedestal-model") # loads seed 0 -state = predictor.init_state() +## Download and check -for actuators in shot: # (29,) float32, raw physical units - out, state = predictor.step(actuators, state) - if out.is_hmode: - print(out.ne, out.te_ped, out.neped_prmtan) +```bash +git clone https://github.com/NoahH72/FUSE-Pedestal-Predictor-Mamba-ONNX +cd FUSE-Pedestal-Predictor-Mamba-ONNX +pip install numpy onnxruntime huggingface_hub +hf download SCS-Lab/FUSE-PED --local-dir export # this page's files, into the code's export/ folder +cd export && sha256sum --check SHA256SUMS && cd .. +python examples/verify_integration.py --bundle export/era ``` -Or straight from onnxruntime, with no Python package — the full contract is -about fifteen lines and is written out in `docs/ONNX.md`. - -## Files +Every line of the checksum check must say OK, and the integration check must pass, before the model is used. -Per seed (`s0/` … `s7/`): +## Run it -| File | | -|---|---| -| `fuse29_step.onnx` | one 50 ms tick, carries state, no length limit | -| `fuse29_seq.onnx` | whole shot at a fixed 256 ticks | -| `model_config.json` | I/O contract: names, order, units, sources, shapes | -| `norms.json` | the statistics baked into the graphs | -| `actuator_ranges.json` | training-split distribution, for checking your units | -| `provenance.json` | source checkpoint SHA-256, library versions, artefact hashes | +```python +from fuse_efit.export.runtime import FuseEfitPredictor # numpy + onnxruntime only -Plus `manifest.json` at the root. **Seed 0 is the champion and the default.** +model = FuseEfitPredictor("export/era", form="single") # or form="averaged" +state = model.init_state() # zeros at the start of every shot +for each 50 ms tick: + y, state = model.step(inputs_25, indicators_5, state) # exactly once per tick +``` -## Inputs +Step graph tensors: `inputs` (batch, 25), `indicators` (batch, 5), `available` (batch, 25), +`conv_state`, `ssm_state` in; `predictions` (batch, 9), `conv_state_out`, `ssm_state_out` out. -29 DIII-D actuator channels in raw physical units: beam power (MW) and torque, -ECH power, the eighteen shaping F-coil currents (A), both E-coil currents (A), -five gas valve flows (Torr·L/s), and the toroidal field (T). Order is -load-bearing; see `docs/IO_CONTRACT.md`. +## Inputs (physical units, this order) -`pohm`, `ip` and `ipspr15v` are deliberately excluded — they are plasma -responses, not commands, and a model predicting the response must not be -handed it. +| # | channel | unit | +|--:|---|---| +| 0 | `pinj` | MW | +| 1 | `tinj` | N m | +| 2 | `ech_mw` | MW | +| 3 | `gasa_cal` | Torr L/s | +| 4 | `gasb_cal` | Torr L/s | +| 5 | `gasc_cal` | Torr L/s | +| 6 | `gasd_cal` | Torr L/s | +| 7 | `gase_cal` | Torr L/s | +| 8 | `bt` | T | +| 9 | `ip` | MA | +| 10 | `aminor` | m | +| 11 | `rsurf` | m | +| 12 | `zsurf` | m | +| 13 | `kappa` | dimensionless | +| 14 | `tritop` | dimensionless | +| 15 | `tribot` | dimensionless | +| 16 | `drsep` | m | +| 17 | `rvsout` | m | +| 18 | `gapin` | m | +| 19 | `rvsou` | m | +| 20 | `rvsiu` | m | +| 21 | `shafranov` | m | +| 22 | `zeta_ou` | dimensionless | +| 23 | `zeta_ol` | dimensionless | +| 24 | `vloop` | V | + +Indicators, 0/1 per tick: `efit_valid`, `vloop_valid`, `rvsout_present`, `rvsou_present`, `rvsiu_present`. Availability, +0/1 per shot and channel (default 1). Where an indicator or the availability flag is 0 the value is +ignored; elsewhere supply a real value (not-a-number is read as the training mean). ## Outputs -| # | Head | Units | +| # | head | unit | |--:|---|---| -| 0 | `ne` | 10¹⁹ m⁻³ | +| 0 | `ne` | 1e19 m^-3 | | 1 | `te_ped` | keV | | 2 | `ti_ped` | keV | | 3 | `t_rot_ped` | krad/s | -| 4 | `neped_prmtan` * | 10¹⁹ m⁻³ | -| 5 | `teped_prmtan` * | keV | -| 6 | `rho_sym` * | ρ_tor | -| 7 | `ne_top_loc` * | ρ_tor | -| 8 | `hmode` | probability | - -\* **H-mode only.** See the limitations below. - -## Performance - -Seed 0, scored with the exported ONNX graph on 4087 held-out shots. Median of -per-shot RMSE: - -| Head | Median per-shot RMSE | Units | -|---|---:|---| -| `ne` | 0.3057 | 10¹⁹ m⁻³ | -| `te_ped` | 0.0605 | keV | -| `ti_ped` | 0.1065 | keV | -| `t_rot_ped` | 4.1497 | krad/s | -| `neped_prmtan` * | 0.3950 | 10¹⁹ m⁻³ | -| `teped_prmtan` * | 0.0783 | keV | -| `rho_sym` * | 0.0113 | ρ_tor | -| `ne_top_loc` * | 0.0134 | ρ_tor | -| `hmode` | 0.9443 accuracy, 0.9476 F1 | — | - -ONNX-vs-PyTorch parity is within 2.5e-05 of a head's training standard -deviation across all eight seeds and both graphs. Full protocol: -`docs/VALIDATION.md`. - -## Training - -~40 900 DIII-D shots, 20 Hz, labels as trailing-bin means with empty bins -masked rather than filled. Stratified random 80/10/10 split (seed 20260829). -AdamW, lr 2e-4, cosine schedule, 25 epochs, batch 128. Checkpoint selected on -lowest total validation loss across all nine heads. - -Eight seeds are published; they differ only in weight initialisation and data -ordering. Full recipe in `docs/TRAINING.md`. - -## Limitations - -- **Four heads are undefined in L-mode.** `neped_prmtan`, `teped_prmtan`, - `rho_sym` and `ne_top_loc` were trained only on H-mode ticks. The graph - emits them unconditionally anyway. You must gate on the model's own `hmode` - output, which is ~94% accurate with errors concentrated at L–H transitions. - See `docs/GATING.md`. -- **Beam power is a live input in this package.** The predecessor (`fuse29_s*`) - could not see `pinj` because a corrupted shot set the divisor to 194 MW. - These weights were retrained against winsorised actuator statistics; a - half-range `pinj` swing now moves `ne` by 0.79. Isolated sweeps are not a - real power scan — other actuators stay at recorded values. See - `docs/LIMITATIONS.md`. -- **Accuracy measures interpolation.** The split is random, so validation - shots come from the same campaigns as training shots. A chronological split - scores roughly 1.5–2× worse. Expect degradation outside the training - distribution, with no built-in warning. -- **No uncertainty.** Seed spread measures optimisation variance, not - predictive uncertainty, and says nothing about errors all eight seeds share. -- **Units have no guard rail.** `pinj` is MW, not W. A unit error produces - confident nonsense rather than an exception; run - `predictor.check_units(shot)` once during integration. -- **Fixed 50 ms cadence**, all 29 channels required every tick, no - missing-channel handling, no dropped-tick recovery. -- **Sequence graph is fixed at 256 ticks.** Use the step graph for anything - longer. -- **float32 only**; no quantised variants are published or validated. -- DIII-D only, ρ_tor = 0.85 only. - -Full discussion in `docs/LIMITATIONS.md`. +| 4 | `ne_knee` | 1e19 m^-3 | +| 5 | `te_knee` | keV | +| 6 | `rho_sym` | rho (normalised radius) | +| 7 | `ne_top_loc` | rho (normalised radius) | +| 8 | `hmode` | probability in [0, 1] | + +`ne_knee`, `te_knee`, `rho_sym` and `ne_top_loc` are defined only in H-mode: report them only where +`hmode` is at or above a threshold. Each form has its own, set on validation: `single` 0.54 +(balanced) and 0.5 (conservative); `averaged` 0.53 and 0.47. On the +test shots each keeps about 95-96 % of H-mode ticks with about 5 % L-mode among those kept (`MODEL_CARD.md` §6). + +## Accuracy + +Typical error per test shot (the median over in-era test shots of each shot's RMSE, physical units; `hmode`: its loss), from the single opening of the test set: + +| output | unit | `single` | `averaged` | +|---|---|---|---| +| `ne` | 1e19 m^-3 | 0.2928 | 0.2594 | +| `te_ped` | keV | 0.05405 | 0.04808 | +| `ti_ped` | keV | 0.09957 | 0.08967 | +| `t_rot_ped` | krad/s | 4.043 | 3.678 | +| `ne_knee` | 1e19 m^-3 | 0.3279 | 0.2973 | +| `te_knee` | keV | 0.06058 | 0.05636 | +| `rho_sym` | rho (normalised radius) | 0.01047 | 0.009892 | +| `ne_top_loc` | rho (normalised radius) | 0.0125 | 0.01188 | +| `hmode` | loss | 0.1373 | 0.1251 | +| combined loss | | 0.9889 | 0.8986 | + +## Export accuracy + +Every graph agrees with the PyTorch model to 7.4e-06 of each head's training standard deviation or better, on 1,988 validation ticks per form and 2,000-tick runs. + +## Limits + +Needs EFIT01 geometry, the between-shot reconstruction, as trained; it is not for use during the shot. Fed +real-time EFIT geometry instead it is about 30 % worse, and far worse on shots where the real-time +reconstruction lacks the strike points. No uncertainty estimate. A unit +error gives confident nonsense, not an error: run `examples/verify_integration.py` and +`check_units` once. Full list: `MODEL_CARD.md` §8. + +## Licence and contact + +Licence: MIT (the `LICENSE` file). Contact: Noah Harris, harrnoah@oregonstate.edu. Code: https://github.com/NoahH72/FUSE-Pedestal-Predictor-Mamba-ONNX. diff --git a/SHA256SUMS b/SHA256SUMS new file mode 100644 index 0000000000000000000000000000000000000000..f0a3ee7cfaeaa786cea40038957079435de6020f --- /dev/null +++ b/SHA256SUMS @@ -0,0 +1,15 @@ +2ae4285c93bc52031670b8ff6d22a2dfd029bb162887eed6e66a8c2fe2cb3566 LICENSE +89c4a1f613dac205c1bef371a33a45c072d3272c4c387ace453b4ccfbfabf999 README.md +cd3eaabcc7f7727e273f8063cb7d52bd324c287d42e62bbae4eeebb32b5b00ec era/averaged/fuse_efit_averaged_sequence.onnx +8d19844716b817216035a72b480d24326c7fe28a64dbf17f8a9ea53178ea359e era/averaged/fuse_efit_averaged_step.onnx +03f5af87195cb7e9746a320bf0070d05b53234e54a6d2e012a6ebd346e64f98d era/averaged/input_ranges.json +27697f17523ac6d8e5da69abded17827b566aaadc57be46f77138831d2b7535c era/averaged/model_config.json +487fa5c79f1e4f58db2df41b239d954e6006d4cc6118228ed9e4241189402ea9 era/averaged/norms.json +1b76be85374bb2a944a9557ff3ab5c86ffde72f9ccbb29525dcb72e34058da5c era/averaged/provenance.json +ddda4e5ed0c3c9aba626ccfea0115863c75d9b71c97b7e44a955919f77b3fac4 era/single/fuse_efit_single_sequence.onnx +3ffc20851386cf7db9f81792e6b247d179229901c9e615d61c8982174e658c76 era/single/fuse_efit_single_step.onnx +03f5af87195cb7e9746a320bf0070d05b53234e54a6d2e012a6ebd346e64f98d era/single/input_ranges.json +9e3ae66bbc5e1333cba705bfd7173ba189b19e32c86fbda64a5035d6ea80d9ac era/single/model_config.json +487fa5c79f1e4f58db2df41b239d954e6006d4cc6118228ed9e4241189402ea9 era/single/norms.json +c481b3f5b07bcb2532bb725629172263e78181752b65641bc27451d3e80a480e era/single/provenance.json +aaf16deb60a3566f505296ec33c8d01f4bea26f5a05dade3b1c6cd8b1d28c97e manifest.json diff --git a/era/averaged/fuse_efit_averaged_sequence.onnx b/era/averaged/fuse_efit_averaged_sequence.onnx new file mode 100644 index 0000000000000000000000000000000000000000..0e6794979049977d4e4e6b0ad6631a1d6abdb429 --- /dev/null +++ b/era/averaged/fuse_efit_averaged_sequence.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd3eaabcc7f7727e273f8063cb7d52bd324c287d42e62bbae4eeebb32b5b00ec +size 735805697 diff --git a/era/averaged/fuse_efit_averaged_step.onnx b/era/averaged/fuse_efit_averaged_step.onnx new file mode 100644 index 0000000000000000000000000000000000000000..9274a2636a4d4bec7a3f42d406199bec38df7966 --- /dev/null +++ b/era/averaged/fuse_efit_averaged_step.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d19844716b817216035a72b480d24326c7fe28a64dbf17f8a9ea53178ea359e +size 732659205 diff --git a/era/averaged/input_ranges.json b/era/averaged/input_ranges.json new file mode 100644 index 0000000000000000000000000000000000000000..3ed9f7ffc0b87d648098f81e8746b801146dd0b2 --- /dev/null +++ b/era/averaged/input_ranges.json @@ -0,0 +1,539 @@ +{ + "schema_version": 1, + "model": "FUSE-EFIT", + "what": "per-channel ranges of the in-era training inputs, physical units, for a units check", + "ticks": "in-era training shots of the train_ and val_ shard files; per channel, shots where it is available and ticks where its governing indicators are 1; finite values only", + "n_shots": 29473, + "n_ticks": 2721294, + "channels": { + "pinj": { + "unit": "MW", + "n_ticks": 2448937, + "n_shots_available": 26253, + "mean": 2.6620712114599616, + "std": 198.71813710424962, + "min": -46005.02734375, + "max": 17.512712478637695, + "pct": { + "0.1": -0.004518520474433899, + "1": -1.766427999427833e-07, + "5": 4.112187479421436e-09, + "25": 1.1759493350982666, + "50": 3.7324979305267334, + "75": 5.975335597991943, + "95": 9.954481315612787, + "99": 12.31949230194093, + "99.9": 14.869131378173837 + } + }, + "tinj": { + "unit": "N m", + "n_ticks": 2448937, + "n_shots_available": 26253, + "mean": 2.139621423755444, + "std": 2.3421389935253805, + "min": -56.64438247680664, + "max": 129.98333740234375, + "pct": { + "0.1": -2.127721426010132, + "1": -0.6094307279586793, + "5": -1.6338495356649219e-07, + "25": 0.2990165650844574, + "50": 1.6169323921203613, + "75": 3.268897533416748, + "95": 6.551688003540035, + "99": 8.862295570373538, + "99.9": 11.422727119446009 + } + }, + "ech_mw": { + "unit": "MW", + "n_ticks": 2375795, + "n_shots_available": 25943, + "mean": 0.4480066792528712, + "std": 0.933062315286273, + "min": -0.2249511331319809, + "max": 4.400252342224121, + "pct": { + "0.1": -0.0168064936734736, + "1": -0.005653742989525199, + "5": -0.0007302230747882277, + "25": 0.0, + "50": 0.0, + "75": 0.0030533920507878065, + "95": 2.893243908882141, + "99": 3.3618859004974375, + "99.9": 3.585800656795506 + } + }, + "gasa_cal": { + "unit": "Torr L/s", + "n_ticks": 2664249, + "n_shots_available": 28863, + "mean": 15.33133604839954, + "std": 28.36489505716798, + "min": -0.9805486798286438, + "max": 348.17791748046875, + "pct": { + "0.1": -0.015396353930234908, + "1": 0.0006017432315275073, + "5": 0.0015028587076812983, + "25": 0.009874774143099785, + "50": 0.09126143902540207, + "75": 20.204317092895508, + "95": 71.37921600341798, + "99": 134.24203918457033, + "99.9": 211.79735192871095 + } + }, + "gasb_cal": { + "unit": "Torr L/s", + "n_ticks": 1673335, + "n_shots_available": 18008, + "mean": 1.990969273701691, + "std": 11.462580440714753, + "min": -0.5231055021286011, + "max": 287.6049499511719, + "pct": { + "0.1": 9.140472684521228e-06, + "1": 0.0005795558099634945, + "5": 0.0014833607710897923, + "25": 0.005166349466890097, + "50": 0.014020266011357307, + "75": 0.06187969818711281, + "95": 8.572828674316382, + "99": 57.822401962280246, + "99.9": 149.42160034179688 + } + }, + "gasc_cal": { + "unit": "Torr L/s", + "n_ticks": 1545281, + "n_shots_available": 16680, + "mean": 0.7112485837789, + "std": 8.255124087718748, + "min": -0.39658045768737793, + "max": 306.0269775390625, + "pct": { + "0.1": 5.6211974879261106e-05, + "1": 0.00018177895981352776, + "5": 0.0004595177888404578, + "25": 0.0012605531373992562, + "50": 0.003039183560758829, + "75": 0.011949803680181503, + "95": 0.17577648162841797, + "99": 13.914536666869594, + "99.9": 143.3022369384774 + } + }, + "gasd_cal": { + "unit": "Torr L/s", + "n_ticks": 1527327, + "n_shots_available": 16708, + "mean": 1.1131473380401657, + "std": 11.254847914946508, + "min": -0.5287260413169861, + "max": 771.50439453125, + "pct": { + "0.1": 3.574852235033177e-05, + "1": 0.00012206944666104391, + "5": 0.00032749708043411374, + "25": 0.001742765074595809, + "50": 0.004008667077869177, + "75": 0.011912376619875431, + "95": 0.33158734738826723, + "99": 35.77535942077627, + "99.9": 163.57034173583992 + } + }, + "gase_cal": { + "unit": "Torr L/s", + "n_ticks": 734608, + "n_shots_available": 8220, + "mean": 0.3558095323106283, + "std": 5.7933940192770965, + "min": -0.22113843262195587, + "max": 182.91339111328125, + "pct": { + "0.1": 6.105265848600538e-05, + "1": 0.0001349276426481083, + "5": 0.00024096852575894445, + "25": 0.0006113611161708832, + "50": 0.0015983160119503736, + "75": 0.007294745184481144, + "95": 0.06228043679147961, + "99": 0.8268458759784698, + "99.9": 129.1965726471041 + } + }, + "bt": { + "unit": "T", + "n_ticks": 2721294, + "n_shots_available": 29473, + "mean": -0.9821883979166512, + "std": 1.6355331835670526, + "min": -2.231337308883667, + "max": 2.251864194869995, + "pct": { + "0.1": -2.213805790901184, + "1": -2.181875057220459, + "5": -2.133511793613434, + "25": -2.0426759719848633, + "50": -1.8808952569961548, + "75": -1.1146354973316193, + "95": 2.0513723731040954, + "99": 2.0833286476135244, + "99.9": 2.182696231603623 + } + }, + "ip": { + "unit": "MA", + "n_ticks": 2721294, + "n_shots_available": 29473, + "mean": 0.8259562500751121, + "std": 0.6308176647686127, + "min": -1.873443841934204, + "max": 2.1881160736083984, + "pct": { + "0.1": -1.4841706775426864, + "1": -1.2937129378318786, + "5": -1.0783746361732482, + "25": 0.7264370024204254, + "50": 0.9817398488521576, + "75": 1.178851455450058, + "95": 1.4719667851924896, + "99": 1.630377171039581, + "99.9": 1.9495262613296536 + } + }, + "aminor": { + "unit": "m", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 0.5900859040383979, + "std": 0.021895064287316395, + "min": 0.22829703986644745, + "max": 0.8744112253189087, + "pct": { + "0.1": 0.5080196781158447, + "1": 0.5374526882171631, + "5": 0.550907027721405, + "25": 0.5785775780677795, + "50": 0.5920447111129761, + "75": 0.603398859500885, + "95": 0.626347541809082, + "99": 0.6415323066711426, + "99.9": 0.659116264343262 + } + }, + "rsurf": { + "unit": "m", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 1.6779164176758374, + "std": 0.028308914638618697, + "min": 1.2506932020187378, + "max": 1.9843217134475708, + "pct": { + "0.1": 1.5659388380050658, + "1": 1.6052298355102539, + "5": 1.6317129373550414, + "25": 1.6620378494262695, + "50": 1.6770155429840088, + "75": 1.6913384199142456, + "95": 1.7333730936050415, + "99": 1.742864499092102, + "99.9": 1.7624900875091556 + } + }, + "zsurf": { + "unit": "m", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": -0.048890203977045646, + "std": 0.08377336901538064, + "min": -0.6153790354728699, + "max": 0.6005730628967285, + "pct": { + "0.1": -0.31802594423294067, + "1": -0.18586712539196015, + "5": -0.15249066054821014, + "25": -0.11547941714525223, + "50": -0.07223256677389145, + "75": 0.02473229169845581, + "95": 0.0917333960533142, + "99": 0.14512855887413026, + "99.9": 0.22172307670117003 + } + }, + "kappa": { + "unit": "dimensionless", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 1.751501826490992, + "std": 0.1400324837230824, + "min": 0.47134819626808167, + "max": 2.212841033935547, + "pct": { + "0.1": 1.1274076805114746, + "1": 1.2236492252349853, + "5": 1.442711305618286, + "25": 1.7150180339813232, + "50": 1.7899725437164307, + "75": 1.8340625762939453, + "95": 1.9024441480636596, + "99": 1.9540843105316164, + "99.9": 2.0269266796112118 + } + }, + "tritop": { + "unit": "dimensionless", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 0.39675614353298694, + "std": 0.23100077037562802, + "min": -0.8470005989074707, + "max": 1.0, + "pct": { + "0.1": -0.42250855803489684, + "1": -0.3465963649749756, + "5": 0.06454417407512665, + "25": 0.23909153044223785, + "50": 0.36581456661224365, + "75": 0.6160924434661865, + "95": 0.7593899011611938, + "99": 0.8330046582221986, + "99.9": 0.8900099992752075 + } + }, + "tribot": { + "unit": "dimensionless", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 0.499044209811709, + "std": 0.24968929063555592, + "min": -0.8580220937728882, + "max": 1.0, + "pct": { + "0.1": -0.7414657316207885, + "1": -0.6374403476715088, + "5": 0.10714363753795625, + "25": 0.34164735674858093, + "50": 0.5473953485488892, + "75": 0.6861203908920288, + "95": 0.7977024435997009, + "99": 0.8486711049079896, + "99.9": 0.9298709597587751 + } + }, + "drsep": { + "unit": "m", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": -0.016213496036148, + "std": 0.06551636751544158, + "min": -0.10000000149011612, + "max": 0.10000000149011612, + "pct": { + "0.1": -0.10000000149011612, + "1": -0.10000000149011612, + "5": -0.10000000149011612, + "25": -0.10000000149011612, + "50": -0.010309768840670586, + "75": 0.01783900149166584, + "95": 0.10000000149011612, + "99": 0.10000000149011612, + "99.9": 0.10000000149011612 + } + }, + "rvsout": { + "unit": "m", + "n_ticks": 2328621, + "n_shots_available": 29452, + "mean": 1.3793721888678152, + "std": 0.12439954558098618, + "min": 1.0127931833267212, + "max": 2.365194320678711, + "pct": { + "0.1": 1.0181231236457824, + "1": 1.1652055978775024, + "5": 1.2722984552383423, + "25": 1.33443021774292, + "50": 1.3540239334106445, + "75": 1.375470519065857, + "95": 1.5593847036361694, + "99": 2.1677620887756346, + "99.9": 2.1831804895401006 + } + }, + "gapin": { + "unit": "m", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 0.07156120898996962, + "std": 0.0432587754778901, + "min": 0.0, + "max": 0.5885139107704163, + "pct": { + "0.1": 0.0, + "1": 6.068613345178164e-08, + "5": 0.00017625917098484933, + "25": 0.04369092732667923, + "50": 0.07125337421894073, + "75": 0.08842182159423828, + "95": 0.16015855669975282, + "99": 0.17832967877388, + "99.9": 0.206968146562578 + } + }, + "rvsou": { + "unit": "m", + "n_ticks": 1490672, + "n_shots_available": 29452, + "mean": 1.3348156930912045, + "std": 0.10334221557069992, + "min": 1.0054652690887451, + "max": 2.3410043716430664, + "pct": { + "0.1": 1.0645662200450898, + "1": 1.134060994386673, + "5": 1.1750591039657592, + "25": 1.3031675815582275, + "50": 1.345410704612732, + "75": 1.3619457483291626, + "95": 1.4928356945514678, + "99": 1.6975986802577974, + "99.9": 2.168685009956361 + } + }, + "rvsiu": { + "unit": "m", + "n_ticks": 1481823, + "n_shots_available": 29452, + "mean": 1.0716172190205149, + "std": 0.0769388213615333, + "min": 1.0010124444961548, + "max": 2.136025905609131, + "pct": { + "0.1": 1.0059778497219085, + "1": 1.0113178491592407, + "5": 1.0127403736114502, + "25": 1.0159999132156372, + "50": 1.019310712814331, + "75": 1.1208724975585938, + "95": 1.2043283700942993, + "99": 1.2522118377685547, + "99.9": 2.034771483421327 + } + }, + "shafranov": { + "unit": "m", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 0.06288958668123741, + "std": 0.034055322691537854, + "min": -0.4082394540309906, + "max": 1.303265929222107, + "pct": { + "0.1": -0.005711350440979004, + "1": 0.006995668411254883, + "5": 0.017068004608154295, + "25": 0.03921254351735115, + "50": 0.05793106555938721, + "75": 0.0799604281783104, + "95": 0.12869288325309752, + "99": 0.16819702863693242, + "99.9": 0.21218299579620437 + } + }, + "zeta_ou": { + "unit": "dimensionless", + "n_ticks": 2620567, + "n_shots_available": 29452, + "mean": -0.121227767772112, + "std": 0.05779856128475274, + "min": -2.3985445499420166, + "max": 0.380886971950531, + "pct": { + "0.1": -0.3649558596014976, + "1": -0.30748181700706484, + "5": -0.23631144613027572, + "25": -0.14568214118480682, + "50": -0.11330334842205048, + "75": -0.08447503671050072, + "95": -0.04684258103370671, + "99": -0.019024645723402546, + "99.9": 0.020023215260360466 + } + }, + "zeta_ol": { + "unit": "dimensionless", + "n_ticks": 2620567, + "n_shots_available": 29452, + "mean": -0.1841641108903704, + "std": 0.11566216697760474, + "min": -2.413620710372925, + "max": 0.25255295634269714, + "pct": { + "0.1": -0.7207684978246689, + "1": -0.6321860718727111, + "5": -0.3719328552484512, + "25": -0.25750887393951416, + "50": -0.15683022141456604, + "75": -0.1041066087782383, + "95": -0.04005956836044792, + "99": 0.008554169535636834, + "99.9": 0.048173654310407044 + } + }, + "vloop": { + "unit": "V", + "n_ticks": 2721294, + "n_shots_available": 29473, + "mean": 0.3860928196706128, + "std": 0.8461846896364685, + "min": -11.052228927612305, + "max": 10.875903129577637, + "pct": { + "0.1": -4.470359791755676, + "1": -2.008943867683411, + "5": -0.7982482045888901, + "25": 0.04159998148679733, + "50": 0.2804970145225525, + "75": 0.6723037213087082, + "95": 1.931114912033081, + "99": 2.662202775478358, + "99.9": 4.445908463478533 + } + } + }, + "indicators": { + "efit_valid": { + "fraction_of_ticks_1": 0.9629951780292758 + }, + "vloop_valid": { + "fraction_of_ticks_1": 1.0 + }, + "rvsout_present": { + "fraction_of_ticks_1": 0.8557035733735495 + }, + "rvsou_present": { + "fraction_of_ticks_1": 0.5477805779162414 + }, + "rvsiu_present": { + "fraction_of_ticks_1": 0.5445288160705899 + } + }, + "units_check_rule": { + "span": "[pct 0.1, pct 99.9]", + "suspect_if_outside": "[pct0.1 - 3 * span_width, pct99.9 + 3 * span_width]", + "span_factor": 3.0, + "note": "a smoke test for unit errors, not a distribution-shift detector" + }, + "dataset": { + "root": "/lus/flare/projects/fusiondl_aesp/d3d_fuse_efit_v1", + "metadata_sha256": "306076a91e9853f61cbcec46ea9cf4e999760e7d02e887a3e4d90f6b6e6ed46c", + "stage1_sha256": "313005ab7d2db432f1048c6c8aaba600edd39b447a85cf355e0e7f564e59b7e7" + }, + "written_utc": "2026-11-08T22:50:46Z" +} diff --git a/era/averaged/model_config.json b/era/averaged/model_config.json new file mode 100644 index 0000000000000000000000000000000000000000..e2f0548b6017de4f898f10ea61edeec48706de3a --- /dev/null +++ b/era/averaged/model_config.json @@ -0,0 +1,505 @@ +{ + "schema_version": 1, + "model": "FUSE-EFIT", + "protocol": "in era (random split of shots 125500-205774; DECISIONS D50, D55)", + "form": "averaged", + "form_meaning": "averaged: the eight in-era finals evaluated side by side; at every tick the mean of their raw outputs (regression z-scores and the H-mode logit) is de-normalised and passed through the sigmoid, as the eight-replicate ensemble was scored", + "members": [ + { + "run": "runs/FULLextfinal_era_r0", + "replicate": 0, + "seed": 100, + "checkpoint_sha256": "28390d5950ec18477394a85dc73498afa0f847502514251b7c96c97569632d96", + "config_sha256": "ddec260834c0f5fdaa5303382140e9c0bca1e3028ccd478c2c2a65f62d6f2398", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r1", + "replicate": 1, + "seed": 101, + "checkpoint_sha256": "46053aa6a7e2b96c3236fba561dc74efb772ce5fb4c3e06c177e9b0b44a10fe2", + "config_sha256": "7f69cc663cf2396df0564115e87e5e00c8eb6ec1382179aef0627f1706ef590e", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r2", + "replicate": 2, + "seed": 102, + "checkpoint_sha256": "1855ba2c6bb045a31fddbf542bef9d9c748a0c0f8630bc23b4f4574ec92e4e30", + "config_sha256": "f7d78968cf29b2a319bad9ccfa851e78fc471fc979f77757732059f8f655d98e", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r3", + "replicate": 3, + "seed": 103, + "checkpoint_sha256": "f9ee89557c3fb5d7ecda0e21269cc17b75337d76f0db9e2480a49da981ddb3b0", + "config_sha256": "3913dea303f6b892d31e82d6f0cad644105de0ed176ede4d604c94c94fcf7a7f", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r4", + "replicate": 4, + "seed": 104, + "checkpoint_sha256": "878583951001053e472a43428ae11e91737285f90fe6ba6d9dac98a618e60121", + "config_sha256": "e0686f2bd559e0ea5bc99a45b5a55d9ec38d064c27ecfdc3a8728059403f36aa", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r5", + "replicate": 5, + "seed": 105, + "checkpoint_sha256": "cae99aaee1adf7a72b09ab4416f3fc7834652191f1d8e298a88900908508ac05", + "config_sha256": "a29e4ad97b4731e4425eec601821d5a10f2a84f6a80794e9f108a96ae44cf7c8", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r6", + "replicate": 6, + "seed": 106, + "checkpoint_sha256": "be34620989ce330df4b1e311242d4b93499a67d5a04ee8b813d41faa3137459a", + "config_sha256": "eda0c86a4cf575b62576a155569fb2ef032af4e8e38f9873c7bc05d7ef8a0720", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r7", + "replicate": 7, + "seed": 107, + "checkpoint_sha256": "bf42ec8fc7b0c6dee2011ded621a04c85e453a3ce3e896cf6e6eb0a095e64bd5", + "config_sha256": "bbd3216e2e47688797ddc2659001cb7172c0717fc01d83316b11f47481dad49c", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + } + ], + "cadence": { + "period_ms": 50.0, + "hz": 20, + "rule": "one step-graph call per 50 ms of simulated time; each tick describes the trailing interval (t - 50 ms, t]; reset the state to zeros at the start of every shot" + }, + "inputs": { + "inputs": { + "shape": [ + "batch", + 25 + ], + "dtype": "float32", + "names": [ + "pinj", + "tinj", + "ech_mw", + "gasa_cal", + "gasb_cal", + "gasc_cal", + "gasd_cal", + "gase_cal", + "bt", + "ip", + "aminor", + "rsurf", + "zsurf", + "kappa", + "tritop", + "tribot", + "drsep", + "rvsout", + "gapin", + "rvsou", + "rvsiu", + "shafranov", + "zeta_ou", + "zeta_ol", + "vloop" + ], + "units": { + "pinj": "MW", + "tinj": "N m", + "ech_mw": "MW", + "gasa_cal": "Torr L/s", + "gasb_cal": "Torr L/s", + "gasc_cal": "Torr L/s", + "gasd_cal": "Torr L/s", + "gase_cal": "Torr L/s", + "bt": "T", + "ip": "MA", + "aminor": "m", + "rsurf": "m", + "zsurf": "m", + "kappa": "dimensionless", + "tritop": "dimensionless", + "tribot": "dimensionless", + "drsep": "m", + "rvsout": "m", + "gapin": "m", + "rvsou": "m", + "rvsiu": "m", + "shafranov": "m", + "zeta_ou": "dimensionless", + "zeta_ol": "dimensionless", + "vloop": "V" + }, + "sources": { + "pinj": "PtData bmspinj: neutral-beam injected power, all sources", + "tinj": "PtData bmstinj: neutral-beam injected torque", + "ech_mw": "MDSplus \\RF::ECHPWRC: calibrated total ECH power injected", + "gasa_cal": "MDSplus NEUTRALS GASFLOW.GASA:FLOW: calibrated gas flow, valve A", + "gasb_cal": "MDSplus NEUTRALS GASFLOW.GASB:FLOW: calibrated gas flow, valve B", + "gasc_cal": "MDSplus NEUTRALS GASFLOW.GASC:FLOW: calibrated gas flow, valve C", + "gasd_cal": "MDSplus NEUTRALS GASFLOW.GASD:FLOW: calibrated gas flow, valve D", + "gase_cal": "MDSplus NEUTRALS GASFLOW.GASE:FLOW: calibrated gas flow, valve E", + "bt": "PtData bt: vacuum toroidal field, signed", + "ip": "PtData ip: measured plasma current (amperes / 1e6)", + "aminor": "EFIT01 AMINOR: minor radius", + "rsurf": "EFIT01 RSURF: major radius of the boundary's geometric centre", + "zsurf": "EFIT01 ZSURF: height of the boundary's geometric centre", + "kappa": "EFIT01 KAPPA: elongation", + "tritop": "EFIT01 TRITOP: upper triangularity", + "tribot": "EFIT01 TRIBOT: lower triangularity", + "drsep": "EFIT01 DRSEP: separatrix separation at the outer midplane, clipped to +-0.1 m per slice", + "rvsout": "EFIT01 RVSOUT: major radius of the outer (lower) strike point", + "gapin": "EFIT01 GAPIN: inner gap", + "rvsou": "EFIT01 RVSOU: major radius of the upper outer strike point", + "rvsiu": "EFIT01 RVSIU: major radius of the upper inner strike point", + "shafranov": "EFIT01 R0 - RSURF: Shafranov shift", + "zeta_ou": "Luce squareness, outer-upper quadrant, from the EFIT01 boundary vertices", + "zeta_ol": "Luce squareness, outer-lower quadrant, from the EFIT01 boundary vertices", + "vloop": "PtData VLOOP: loop voltage" + }, + "grid_rule": { + "pinj": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "tinj": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "ech_mw": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "gasa_cal": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "gasb_cal": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "gasc_cal": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "gasd_cal": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "gase_cal": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "bt": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "ip": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "aminor": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "rsurf": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "zsurf": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "kappa": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "tritop": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "tribot": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "drsep": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "rvsout": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "gapin": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "rvsou": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "rvsiu": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "shafranov": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "zeta_ou": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "zeta_ol": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "vloop": "mean of the native samples in (t - 50 ms, t] (INPUT_CONTRACT 3.3)" + }, + "zeroed_when_indicator_is_0": { + "pinj": [], + "tinj": [], + "ech_mw": [], + "gasa_cal": [], + "gasb_cal": [], + "gasc_cal": [], + "gasd_cal": [], + "gase_cal": [], + "bt": [], + "ip": [], + "aminor": [ + "efit_valid" + ], + "rsurf": [ + "efit_valid" + ], + "zsurf": [ + "efit_valid" + ], + "kappa": [ + "efit_valid" + ], + "tritop": [ + "efit_valid" + ], + "tribot": [ + "efit_valid" + ], + "drsep": [ + "efit_valid" + ], + "rvsout": [ + "efit_valid", + "rvsout_present" + ], + "gapin": [ + "efit_valid" + ], + "rvsou": [ + "efit_valid", + "rvsou_present" + ], + "rvsiu": [ + "efit_valid", + "rvsiu_present" + ], + "shafranov": [ + "efit_valid" + ], + "zeta_ou": [ + "efit_valid" + ], + "zeta_ol": [ + "efit_valid" + ], + "vloop": [ + "vloop_valid" + ] + }, + "note": "Physical units, contract order (docs/INPUT_CONTRACT.md \u00a72). Where a governing indicator is 0 the value is ignored (any number, or NaN). NaN anywhere is read as the training mean, so never pass NaN for a value you have." + }, + "indicators": { + "shape": [ + "batch", + 5 + ], + "dtype": "float32", + "values": "0 or 1, per tick", + "names": [ + "efit_valid", + "vloop_valid", + "rvsout_present", + "rvsou_present", + "rvsiu_present" + ], + "meaning": { + "efit_valid": "1 when at least one usable EFIT slice lies in (t - 50 ms, t]; 0 otherwise", + "vloop_valid": "1 when at least one loop-voltage sample lies in (t - 50 ms, t]; 0 otherwise", + "rvsout_present": "1 when at least one slice in the window has a real outer strike point; 0 otherwise", + "rvsou_present": "1 when at least one slice in the window has a real upper outer strike point; 0 otherwise", + "rvsiu_present": "1 when at least one slice in the window has a real upper inner strike point; 0 otherwise" + } + }, + "available": { + "shape": [ + "batch", + 25 + ], + "dtype": "float32", + "values": "0 or 1, per shot", + "names": [ + "pinj", + "tinj", + "ech_mw", + "gasa_cal", + "gasb_cal", + "gasc_cal", + "gasd_cal", + "gase_cal", + "bt", + "ip", + "aminor", + "rsurf", + "zsurf", + "kappa", + "tritop", + "tribot", + "drsep", + "rvsout", + "gapin", + "rvsou", + "rvsiu", + "shafranov", + "zeta_ou", + "zeta_ol", + "vloop" + ], + "default": 1, + "note": "1 = a usable record of this channel exists for the shot (the normal case). 0 = no record for the whole shot: the value is ignored and the model receives the flag, as it did in training for missing records. Keep it constant within a shot." + } + }, + "outputs": { + "predictions": { + "shape": [ + "batch", + 9 + ], + "dtype": "float32", + "names": [ + "ne", + "te_ped", + "ti_ped", + "t_rot_ped", + "ne_knee", + "te_knee", + "rho_sym", + "ne_top_loc", + "hmode" + ], + "units": { + "ne": "1e19 m^-3", + "te_ped": "keV", + "ti_ped": "keV", + "t_rot_ped": "krad/s", + "ne_knee": "1e19 m^-3", + "te_knee": "keV", + "rho_sym": "rho (normalised radius)", + "ne_top_loc": "rho (normalised radius)", + "hmode": "probability in [0, 1]" + }, + "meaning": { + "ne": "electron density at rho = 0.85", + "te_ped": "electron temperature at rho = 0.85", + "ti_ped": "ion temperature at rho = 0.85", + "t_rot_ped": "toroidal rotation at rho = 0.85", + "ne_knee": "electron density on the pedestal fit at its knee (H-mode only)", + "te_knee": "electron temperature on its pedestal fit at its knee (H-mode only)", + "rho_sym": "symmetry point of the density pedestal fit (H-mode only)", + "ne_top_loc": "knee (pedestal top) of the density pedestal fit (H-mode only)", + "hmode": "the plasma is in H-mode (sigmoid of the averaged or single logit)" + } + }, + "hmode_gated_heads": [ + "ne_knee", + "te_knee", + "rho_sym", + "ne_top_loc" + ], + "hmode_gated_note": "Trained on H-mode ticks only and undefined in L-mode; the graph emits a number anyway. Report them only where predictions[hmode] >= threshold; otherwise treat them as undefined, never as 0.", + "hmode_thresholds": { + "frozen": { + "balanced": 0.53, + "conservative": 0.47 + }, + "definitions": { + "balanced": "maximum Youden's J on validation (the best trade between missed H-mode and admitted L-mode ticks)", + "conservative": "the lowest threshold keeping L-mode ticks at or below 5 % of admitted validation ticks" + }, + "set_on": "the mean of the eight finals' hmode logits, in-era validation split", + "source": "receipts/G7_export_inputs/hmode_thresholds_both_forms.json (DECISIONS D64)", + "source_sha256": "b9c027ec369a251dcb48bbc7c444bc39628d9e9ad24b35bc1ce1845705b6a3d1", + "note": "Gate the four H-mode-only heads on predictions[hmode] >= threshold; MODEL_CARD.md \u00a76." + } + }, + "graphs": { + "step": { + "file": "fuse_efit_averaged_step.onnx", + "purpose": "one 50 ms tick per call; unbounded shot length", + "inputs": { + "inputs": [ + "batch", + 25 + ], + "indicators": [ + "batch", + 5 + ], + "available": [ + "batch", + 25 + ], + "conv_state": [ + 48, + "batch", + 1792, + 3 + ], + "ssm_state": [ + 48, + "batch", + 12, + 128, + 64 + ] + }, + "outputs": { + "predictions": [ + "batch", + 9 + ], + "conv_state_out": [ + 48, + "batch", + 1792, + 3 + ], + "ssm_state_out": [ + 48, + "batch", + 12, + 128, + 64 + ] + } + }, + "sequence": { + "file": "fuse_efit_averaged_sequence.onnx", + "seq_len": 256, + "purpose": "a whole window of exactly seq_len ticks; right-pad a shorter shot (any finite values, indicators 1) and keep the first K outputs, which is exact because the model is causal; use the step graph for longer shots", + "inputs": { + "inputs": [ + "batch", + 256, + 25 + ], + "indicators": [ + "batch", + 256, + 5 + ], + "available": [ + "batch", + 25 + ] + }, + "outputs": { + "predictions": [ + "batch", + 256, + 9 + ] + } + } + }, + "state": { + "conv_state": [ + "n_members x n_layers", + "batch", + 1792, + 3 + ], + "ssm_state": [ + "n_members x n_layers", + "batch", + 12, + 128, + 64 + ], + "leading_axis": 48, + "n_members": 8, + "n_layers": 6, + "initial": "all zeros at the start of every shot", + "bytes_per_shot": 19906560, + "note": "Opaque: store what the step graph returns and pass it back on the next call. The two forms differ only in the leading axis of these two tensors." + }, + "architecture": { + "family": "Mamba-2 state-space sequence model", + "d_model": 768, + "n_layers": 6, + "d_state": 64, + "d_conv": 4, + "expand": 2, + "headdim": 128, + "nheads": 12, + "ngroups": 2, + "d_inner": 1536, + "conv_dim": 1792, + "chunk_size": 100, + "n_inputs_trunk": 30, + "n_params_per_member": 22882785, + "n_members": 8 + }, + "input_transform": { + "clip_sigma": 20.0, + "std_floor": 1e-06, + "file": "norms.json", + "applied": "inside the graphs" + }, + "dtype": "float32", + "onnx_opset": 17, + "documentation": "docs/EXPORT.md, docs/INPUT_CONTRACT.md, MODEL_CARD.md" +} diff --git a/era/averaged/norms.json b/era/averaged/norms.json new file mode 100644 index 0000000000000000000000000000000000000000..a201d141aee4cc0f61f29ab5d3bbd8c1d1de9508 --- /dev/null +++ b/era/averaged/norms.json @@ -0,0 +1,294 @@ +{ + "schema_version": 1, + "note": "The statistics baked into the graphs, for inspection and for reproducing the transform outside them. A host does not need this file to run the model.", + "input_transform": "z = clip((x - mean) / std, -clip_sigma, +clip_sigma) per channel, x in physical units; not-a-number -> 0; then z -> 0 where the channel is unavailable or a governing indicator is 0", + "clip_sigma": 20.0, + "std_floor": 1e-06, + "inputs": { + "names": [ + "pinj", + "tinj", + "ech_mw", + "gasa_cal", + "gasb_cal", + "gasc_cal", + "gasd_cal", + "gase_cal", + "bt", + "ip", + "aminor", + "rsurf", + "zsurf", + "kappa", + "tritop", + "tribot", + "drsep", + "rvsout", + "gapin", + "rvsou", + "rvsiu", + "shafranov", + "zeta_ou", + "zeta_ol", + "vloop" + ], + "units": [ + "MW", + "N m", + "MW", + "Torr L/s", + "Torr L/s", + "Torr L/s", + "Torr L/s", + "Torr L/s", + "T", + "MA", + "m", + "m", + "m", + "dimensionless", + "dimensionless", + "dimensionless", + "m", + "m", + "m", + "m", + "m", + "m", + "dimensionless", + "dimensionless", + "V" + ], + "mean": [ + 3.942431288688486, + 2.2096625295179186, + 0.4654761552810669, + 15.061767862270832, + 1.4919341408834326, + 0.23709206776972092, + 0.5197598621986353, + 0.021391137846201724, + -0.9720653400720033, + 0.8316150307655334, + 0.589589536190033, + 1.677773356437683, + -0.05055605247616768, + 1.7517046928405762, + 0.3966327905654907, + 0.5042979121208191, + -0.015922507271170616, + 1.3765016794204712, + 0.06946969032287598, + 1.3273015022277832, + 1.0669854879379272, + 0.06224634870886803, + -0.12007330358028412, + -0.18449491262435913, + 0.38771408796310425 + ], + "std": [ + 3.195729724075188, + 2.217424308626617, + 0.9441152811050415, + 26.64435504465176, + 6.993835352190119, + 1.6900931025396266, + 3.7040796936604687, + 0.10363119099527826, + 1.6484726180777753, + 0.6177622675895691, + 0.02114672213792801, + 0.027116550132632256, + 0.0815875306725502, + 0.14088328182697296, + 0.23491179943084717, + 0.24562624096870422, + 0.06496237963438034, + 0.12265536934137344, + 0.04288293793797493, + 0.09615185856819153, + 0.06577663868665695, + 0.03295154869556427, + 0.054369814693927765, + 0.10875540971755981, + 0.7761709094047546 + ] + }, + "stages": { + "note": "The composed statistics above are stage 2 applied after stage 1: mean = m1 + s1 * m2, std = s1 * s2. Stage 1 is the dataset's stored scale (identity except for the beam, gas and field channels); stage 2 is the in-era training-split standardisation.", + "stage1_physical_to_stored": { + "mean": [ + 2.8111997039100878, + 2.154143940948575, + 0.0, + 14.89178144369171, + 1.9421402622606716, + 0.7508911827356307, + 1.0383906373403984, + 0.3920832239686922, + -1.0310375752078498, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + "std": [ + 194.08418888726106, + 2.3684465859740262, + 1.0, + 27.289184462156058, + 11.092415079529571, + 9.017289768908354, + 12.055982101097918, + 6.498888909025979, + 1.599000778986496, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + }, + "stage2_stored_to_model": { + "mean": [ + 0.005828561261296272, + 0.023440929129719734, + 0.4654761552810669, + 0.006229076534509659, + -0.040586844086647034, + -0.05697932839393616, + -0.04301854223012924, + -0.057039301842451096, + 0.03688067942857742, + 0.8316150307655334, + 0.589589536190033, + 1.677773356437683, + -0.05055605247616768, + 1.7517046928405762, + 0.3966327905654907, + 0.5042979121208191, + -0.015922507271170616, + 1.3765016794204712, + 0.06946969032287598, + 1.3273015022277832, + 1.0669854879379272, + 0.06224634870886803, + -0.12007330358028412, + -0.18449491262435913, + 0.38771408796310425 + ], + "std": [ + 0.01646568812429905, + 0.9362357258796692, + 0.9441152811050415, + 0.9763705134391785, + 0.6305060982704163, + 0.1874280571937561, + 0.30723997950553894, + 0.015945985913276672, + 1.0309392213821411, + 0.6177622675895691, + 0.02114672213792801, + 0.027116550132632256, + 0.0815875306725502, + 0.14088328182697296, + 0.23491179943084717, + 0.24562624096870422, + 0.06496237963438034, + 0.12265536934137344, + 0.04288293793797493, + 0.09615185856819153, + 0.06577663868665695, + 0.03295154869556427, + 0.054369814693927765, + 0.10875540971755981, + 0.7761709094047546 + ] + } + }, + "indicators": { + "names": [ + "efit_valid", + "vloop_valid", + "rvsout_present", + "rvsou_present", + "rvsiu_present" + ], + "transform": "none: 0/1 passed as they are (read as 1 when > 0.5)" + }, + "targets": { + "ne": { + "mean": 2.75117452029956, + "std": 1.6541537951642646, + "unit": "1e19 m^-3" + }, + "te_ped": { + "mean": 0.5915626266199993, + "std": 0.43467429211593894, + "unit": "keV" + }, + "ti_ped": { + "mean": 1.0168501881070604, + "std": 0.6810960596049213, + "unit": "keV" + }, + "t_rot_ped": { + "mean": 21.24461452086136, + "std": 16.5914840454496, + "unit": "krad/s" + }, + "ne_knee": { + "mean": 2.4166156855194076, + "std": 1.5067549102828321, + "unit": "1e19 m^-3" + }, + "te_knee": { + "mean": 0.44874806504511355, + "std": 0.33939948718776175, + "unit": "keV" + }, + "rho_sym": { + "mean": 0.9757616411014167, + "std": 0.04329206963559261, + "unit": "rho (normalised radius)" + }, + "ne_top_loc": { + "mean": 0.9261865006629387, + "std": 0.04989716973523974, + "unit": "rho (normalised radius)" + } + }, + "hmode": { + "transform": "probability = sigmoid(logit); in the averaged form the logit is the mean of the members' logits" + }, + "source": { + "dataset_root": "/lus/flare/projects/fusiondl_aesp/d3d_fuse_efit_v1", + "norms_file": "norms.json", + "norms_sha256": "e28b8331a042054543dc97c49d977372012cfbb86119c276b536a1e945f5e926", + "stage1_sha256": "313005ab7d2db432f1048c6c8aaba600edd39b447a85cf355e0e7f564e59b7e7", + "metadata_sha256": "306076a91e9853f61cbcec46ea9cf4e999760e7d02e887a3e4d90f6b6e6ed46c" + } +} diff --git a/era/averaged/provenance.json b/era/averaged/provenance.json new file mode 100644 index 0000000000000000000000000000000000000000..45e328dfe405f2f4a1e56c1999af1e4477379fc2 --- /dev/null +++ b/era/averaged/provenance.json @@ -0,0 +1,136 @@ +{ + "schema_version": 1, + "model": "FUSE-EFIT", + "form": "averaged", + "exported_utc": "2026-11-08T22:51:23Z", + "host": "x4217c6s0b0n0", + "members": [ + { + "run": "runs/FULLextfinal_era_r0", + "replicate": 0, + "seed": 100, + "checkpoint_sha256": "28390d5950ec18477394a85dc73498afa0f847502514251b7c96c97569632d96", + "config_sha256": "ddec260834c0f5fdaa5303382140e9c0bca1e3028ccd478c2c2a65f62d6f2398", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r1", + "replicate": 1, + "seed": 101, + "checkpoint_sha256": "46053aa6a7e2b96c3236fba561dc74efb772ce5fb4c3e06c177e9b0b44a10fe2", + "config_sha256": "7f69cc663cf2396df0564115e87e5e00c8eb6ec1382179aef0627f1706ef590e", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r2", + "replicate": 2, + "seed": 102, + "checkpoint_sha256": "1855ba2c6bb045a31fddbf542bef9d9c748a0c0f8630bc23b4f4574ec92e4e30", + "config_sha256": "f7d78968cf29b2a319bad9ccfa851e78fc471fc979f77757732059f8f655d98e", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r3", + "replicate": 3, + "seed": 103, + "checkpoint_sha256": "f9ee89557c3fb5d7ecda0e21269cc17b75337d76f0db9e2480a49da981ddb3b0", + "config_sha256": "3913dea303f6b892d31e82d6f0cad644105de0ed176ede4d604c94c94fcf7a7f", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r4", + "replicate": 4, + "seed": 104, + "checkpoint_sha256": "878583951001053e472a43428ae11e91737285f90fe6ba6d9dac98a618e60121", + "config_sha256": "e0686f2bd559e0ea5bc99a45b5a55d9ec38d064c27ecfdc3a8728059403f36aa", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r5", + "replicate": 5, + "seed": 105, + "checkpoint_sha256": "cae99aaee1adf7a72b09ab4416f3fc7834652191f1d8e298a88900908508ac05", + "config_sha256": "a29e4ad97b4731e4425eec601821d5a10f2a84f6a80794e9f108a96ae44cf7c8", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r6", + "replicate": 6, + "seed": 106, + "checkpoint_sha256": "be34620989ce330df4b1e311242d4b93499a67d5a04ee8b813d41faa3137459a", + "config_sha256": "eda0c86a4cf575b62576a155569fb2ef032af4e8e38f9873c7bc05d7ef8a0720", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + }, + { + "run": "runs/FULLextfinal_era_r7", + "replicate": 7, + "seed": 107, + "checkpoint_sha256": "bf42ec8fc7b0c6dee2011ded621a04c85e453a3ce3e896cf6e6eb0a095e64bd5", + "config_sha256": "bbd3216e2e47688797ddc2659001cb7172c0717fc01d83316b11f47481dad49c", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + } + ], + "freeze_record": { + "path": "receipts/G5_freeze.json", + "sha256": "1fbd776750736a6995a5de48b74b16bc13e0a2a1539972e46be23e8dbb49316e" + }, + "dataset": { + "root": "/lus/flare/projects/fusiondl_aesp/d3d_fuse_efit_v1", + "norms_file": "norms.json", + "norms_sha256": "e28b8331a042054543dc97c49d977372012cfbb86119c276b536a1e945f5e926", + "stage1_sha256": "313005ab7d2db432f1048c6c8aaba600edd39b447a85cf355e0e7f564e59b7e7", + "metadata_sha256": "306076a91e9853f61cbcec46ea9cf4e999760e7d02e887a3e4d90f6b6e6ed46c" + }, + "exporter": "torch.onnx.export, TorchScript path (dynamo=False), do_constant_folding", + "onnx_opset": 17, + "seq_len": 256, + "code": { + "code_sha256": "fdeb0962110362492e04d06d51af130c716c57c3050e7dfe13766177529730da", + "code_sha256_rule": "tools/code_snapshot.py: sha256 over fuse_efit/, tests/, tools/, pbs/", + "files": { + "examples/run_model.py": "aaff89b5f24096c80b43336baedabadff629b688b6543d8187792193c6795075", + "examples/verify_integration.py": "39d0cf9f13262d9a2ebe2281ebe0e808b1b963e2e95a1042cd3f65c8b1dcd4aa", + "fuse_efit/export/__init__.py": "404033894bba4772bbec986bb151f4478faa45fe9bf39c4d5e2722e85377517c", + "fuse_efit/export/contract.py": "de13fe7a8f39db77a351002fbcf8734db93251e0692b37292e842d022c20b561", + "fuse_efit/export/export_onnx.py": "cef50775b39f6164e4943305976665f386423d61a3a414fa751768007799e923", + "fuse_efit/export/graphs.py": "13056c2ebe06a104f94c83ebaea0752bf97941945e6797a8d49f8f3ce9861a4d", + "fuse_efit/export/input_ranges.py": "287d8cbf97163982a98e573e7dcb021fa29e860c4b4f20ac76a0870fdb1b1655", + "fuse_efit/export/make_reference.py": "dbd20fa4ffd5a2dbe668245f32c86171a2ecc349a768f95bc62c498d28d3d48e", + "fuse_efit/export/runtime.py": "a70d08d661ebbfd5b4992ff0a6598e28bbf04c1a674eb97589420985f3068a67", + "fuse_efit/export/step.py": "dee8e5ef7d0d843d9ddf25dee40c93199dba6a3afab0042b929831ae49b7af50", + "fuse_efit/export/timing.py": "ab9f4f8b35fead7c22f8c0b0e3b9153e3f660c8d8857a1e22bdb188ca8b56669", + "fuse_efit/export/val_shots.py": "d26c4c20e7c95cae8f3204cc94e60fd897a932cb5db9b24733d0041f654981eb", + "fuse_efit/export/validate_onnx.py": "93c907a2d1bd2b2d38497f93183bba6d5ff4e0813d9d1ce0f3e2f65404837625" + } + }, + "versions": { + "torch": "2.13.0a0+gitcf30153", + "numpy": "2.3.5", + "python": "3.12.12", + "onnx": "1.23.1", + "onnxruntime": "1.30.0" + }, + "platform": "Linux-6.4.0-150700.53.78-default-x86_64-with-glibc2.38", + "artifacts": { + "fuse_efit_averaged_step.onnx": { + "bytes": 732659205, + "sha256": "8d19844716b817216035a72b480d24326c7fe28a64dbf17f8a9ea53178ea359e" + }, + "fuse_efit_averaged_sequence.onnx": { + "bytes": 735805697, + "sha256": "cd3eaabcc7f7727e273f8063cb7d52bd324c287d42e62bbae4eeebb32b5b00ec" + }, + "model_config.json": { + "bytes": 18269, + "sha256": "27697f17523ac6d8e5da69abded17827b566aaadc57be46f77138831d2b7535c" + }, + "norms.json": { + "bytes": 7130, + "sha256": "487fa5c79f1e4f58db2df41b239d954e6006d4cc6118228ed9e4241189402ea9" + }, + "input_ranges.json": { + "bytes": 15628, + "sha256": "03f5af87195cb7e9746a320bf0070d05b53234e54a6d2e012a6ebd346e64f98d" + } + } +} diff --git a/era/single/fuse_efit_single_sequence.onnx b/era/single/fuse_efit_single_sequence.onnx new file mode 100644 index 0000000000000000000000000000000000000000..c50c4ca1e2805f665f638d22ef9f53df6aabdd94 --- /dev/null +++ b/era/single/fuse_efit_single_sequence.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddda4e5ed0c3c9aba626ccfea0115863c75d9b71c97b7e44a955919f77b3fac4 +size 91967120 diff --git a/era/single/fuse_efit_single_step.onnx b/era/single/fuse_efit_single_step.onnx new file mode 100644 index 0000000000000000000000000000000000000000..3488ce2a53487602944c38b72f7cfdb6c93ebb40 --- /dev/null +++ b/era/single/fuse_efit_single_step.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ffc20851386cf7db9f81792e6b247d179229901c9e615d61c8982174e658c76 +size 91586758 diff --git a/era/single/input_ranges.json b/era/single/input_ranges.json new file mode 100644 index 0000000000000000000000000000000000000000..3ed9f7ffc0b87d648098f81e8746b801146dd0b2 --- /dev/null +++ b/era/single/input_ranges.json @@ -0,0 +1,539 @@ +{ + "schema_version": 1, + "model": "FUSE-EFIT", + "what": "per-channel ranges of the in-era training inputs, physical units, for a units check", + "ticks": "in-era training shots of the train_ and val_ shard files; per channel, shots where it is available and ticks where its governing indicators are 1; finite values only", + "n_shots": 29473, + "n_ticks": 2721294, + "channels": { + "pinj": { + "unit": "MW", + "n_ticks": 2448937, + "n_shots_available": 26253, + "mean": 2.6620712114599616, + "std": 198.71813710424962, + "min": -46005.02734375, + "max": 17.512712478637695, + "pct": { + "0.1": -0.004518520474433899, + "1": -1.766427999427833e-07, + "5": 4.112187479421436e-09, + "25": 1.1759493350982666, + "50": 3.7324979305267334, + "75": 5.975335597991943, + "95": 9.954481315612787, + "99": 12.31949230194093, + "99.9": 14.869131378173837 + } + }, + "tinj": { + "unit": "N m", + "n_ticks": 2448937, + "n_shots_available": 26253, + "mean": 2.139621423755444, + "std": 2.3421389935253805, + "min": -56.64438247680664, + "max": 129.98333740234375, + "pct": { + "0.1": -2.127721426010132, + "1": -0.6094307279586793, + "5": -1.6338495356649219e-07, + "25": 0.2990165650844574, + "50": 1.6169323921203613, + "75": 3.268897533416748, + "95": 6.551688003540035, + "99": 8.862295570373538, + "99.9": 11.422727119446009 + } + }, + "ech_mw": { + "unit": "MW", + "n_ticks": 2375795, + "n_shots_available": 25943, + "mean": 0.4480066792528712, + "std": 0.933062315286273, + "min": -0.2249511331319809, + "max": 4.400252342224121, + "pct": { + "0.1": -0.0168064936734736, + "1": -0.005653742989525199, + "5": -0.0007302230747882277, + "25": 0.0, + "50": 0.0, + "75": 0.0030533920507878065, + "95": 2.893243908882141, + "99": 3.3618859004974375, + "99.9": 3.585800656795506 + } + }, + "gasa_cal": { + "unit": "Torr L/s", + "n_ticks": 2664249, + "n_shots_available": 28863, + "mean": 15.33133604839954, + "std": 28.36489505716798, + "min": -0.9805486798286438, + "max": 348.17791748046875, + "pct": { + "0.1": -0.015396353930234908, + "1": 0.0006017432315275073, + "5": 0.0015028587076812983, + "25": 0.009874774143099785, + "50": 0.09126143902540207, + "75": 20.204317092895508, + "95": 71.37921600341798, + "99": 134.24203918457033, + "99.9": 211.79735192871095 + } + }, + "gasb_cal": { + "unit": "Torr L/s", + "n_ticks": 1673335, + "n_shots_available": 18008, + "mean": 1.990969273701691, + "std": 11.462580440714753, + "min": -0.5231055021286011, + "max": 287.6049499511719, + "pct": { + "0.1": 9.140472684521228e-06, + "1": 0.0005795558099634945, + "5": 0.0014833607710897923, + "25": 0.005166349466890097, + "50": 0.014020266011357307, + "75": 0.06187969818711281, + "95": 8.572828674316382, + "99": 57.822401962280246, + "99.9": 149.42160034179688 + } + }, + "gasc_cal": { + "unit": "Torr L/s", + "n_ticks": 1545281, + "n_shots_available": 16680, + "mean": 0.7112485837789, + "std": 8.255124087718748, + "min": -0.39658045768737793, + "max": 306.0269775390625, + "pct": { + "0.1": 5.6211974879261106e-05, + "1": 0.00018177895981352776, + "5": 0.0004595177888404578, + "25": 0.0012605531373992562, + "50": 0.003039183560758829, + "75": 0.011949803680181503, + "95": 0.17577648162841797, + "99": 13.914536666869594, + "99.9": 143.3022369384774 + } + }, + "gasd_cal": { + "unit": "Torr L/s", + "n_ticks": 1527327, + "n_shots_available": 16708, + "mean": 1.1131473380401657, + "std": 11.254847914946508, + "min": -0.5287260413169861, + "max": 771.50439453125, + "pct": { + "0.1": 3.574852235033177e-05, + "1": 0.00012206944666104391, + "5": 0.00032749708043411374, + "25": 0.001742765074595809, + "50": 0.004008667077869177, + "75": 0.011912376619875431, + "95": 0.33158734738826723, + "99": 35.77535942077627, + "99.9": 163.57034173583992 + } + }, + "gase_cal": { + "unit": "Torr L/s", + "n_ticks": 734608, + "n_shots_available": 8220, + "mean": 0.3558095323106283, + "std": 5.7933940192770965, + "min": -0.22113843262195587, + "max": 182.91339111328125, + "pct": { + "0.1": 6.105265848600538e-05, + "1": 0.0001349276426481083, + "5": 0.00024096852575894445, + "25": 0.0006113611161708832, + "50": 0.0015983160119503736, + "75": 0.007294745184481144, + "95": 0.06228043679147961, + "99": 0.8268458759784698, + "99.9": 129.1965726471041 + } + }, + "bt": { + "unit": "T", + "n_ticks": 2721294, + "n_shots_available": 29473, + "mean": -0.9821883979166512, + "std": 1.6355331835670526, + "min": -2.231337308883667, + "max": 2.251864194869995, + "pct": { + "0.1": -2.213805790901184, + "1": -2.181875057220459, + "5": -2.133511793613434, + "25": -2.0426759719848633, + "50": -1.8808952569961548, + "75": -1.1146354973316193, + "95": 2.0513723731040954, + "99": 2.0833286476135244, + "99.9": 2.182696231603623 + } + }, + "ip": { + "unit": "MA", + "n_ticks": 2721294, + "n_shots_available": 29473, + "mean": 0.8259562500751121, + "std": 0.6308176647686127, + "min": -1.873443841934204, + "max": 2.1881160736083984, + "pct": { + "0.1": -1.4841706775426864, + "1": -1.2937129378318786, + "5": -1.0783746361732482, + "25": 0.7264370024204254, + "50": 0.9817398488521576, + "75": 1.178851455450058, + "95": 1.4719667851924896, + "99": 1.630377171039581, + "99.9": 1.9495262613296536 + } + }, + "aminor": { + "unit": "m", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 0.5900859040383979, + "std": 0.021895064287316395, + "min": 0.22829703986644745, + "max": 0.8744112253189087, + "pct": { + "0.1": 0.5080196781158447, + "1": 0.5374526882171631, + "5": 0.550907027721405, + "25": 0.5785775780677795, + "50": 0.5920447111129761, + "75": 0.603398859500885, + "95": 0.626347541809082, + "99": 0.6415323066711426, + "99.9": 0.659116264343262 + } + }, + "rsurf": { + "unit": "m", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 1.6779164176758374, + "std": 0.028308914638618697, + "min": 1.2506932020187378, + "max": 1.9843217134475708, + "pct": { + "0.1": 1.5659388380050658, + "1": 1.6052298355102539, + "5": 1.6317129373550414, + "25": 1.6620378494262695, + "50": 1.6770155429840088, + "75": 1.6913384199142456, + "95": 1.7333730936050415, + "99": 1.742864499092102, + "99.9": 1.7624900875091556 + } + }, + "zsurf": { + "unit": "m", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": -0.048890203977045646, + "std": 0.08377336901538064, + "min": -0.6153790354728699, + "max": 0.6005730628967285, + "pct": { + "0.1": -0.31802594423294067, + "1": -0.18586712539196015, + "5": -0.15249066054821014, + "25": -0.11547941714525223, + "50": -0.07223256677389145, + "75": 0.02473229169845581, + "95": 0.0917333960533142, + "99": 0.14512855887413026, + "99.9": 0.22172307670117003 + } + }, + "kappa": { + "unit": "dimensionless", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 1.751501826490992, + "std": 0.1400324837230824, + "min": 0.47134819626808167, + "max": 2.212841033935547, + "pct": { + "0.1": 1.1274076805114746, + "1": 1.2236492252349853, + "5": 1.442711305618286, + "25": 1.7150180339813232, + "50": 1.7899725437164307, + "75": 1.8340625762939453, + "95": 1.9024441480636596, + "99": 1.9540843105316164, + "99.9": 2.0269266796112118 + } + }, + "tritop": { + "unit": "dimensionless", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 0.39675614353298694, + "std": 0.23100077037562802, + "min": -0.8470005989074707, + "max": 1.0, + "pct": { + "0.1": -0.42250855803489684, + "1": -0.3465963649749756, + "5": 0.06454417407512665, + "25": 0.23909153044223785, + "50": 0.36581456661224365, + "75": 0.6160924434661865, + "95": 0.7593899011611938, + "99": 0.8330046582221986, + "99.9": 0.8900099992752075 + } + }, + "tribot": { + "unit": "dimensionless", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 0.499044209811709, + "std": 0.24968929063555592, + "min": -0.8580220937728882, + "max": 1.0, + "pct": { + "0.1": -0.7414657316207885, + "1": -0.6374403476715088, + "5": 0.10714363753795625, + "25": 0.34164735674858093, + "50": 0.5473953485488892, + "75": 0.6861203908920288, + "95": 0.7977024435997009, + "99": 0.8486711049079896, + "99.9": 0.9298709597587751 + } + }, + "drsep": { + "unit": "m", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": -0.016213496036148, + "std": 0.06551636751544158, + "min": -0.10000000149011612, + "max": 0.10000000149011612, + "pct": { + "0.1": -0.10000000149011612, + "1": -0.10000000149011612, + "5": -0.10000000149011612, + "25": -0.10000000149011612, + "50": -0.010309768840670586, + "75": 0.01783900149166584, + "95": 0.10000000149011612, + "99": 0.10000000149011612, + "99.9": 0.10000000149011612 + } + }, + "rvsout": { + "unit": "m", + "n_ticks": 2328621, + "n_shots_available": 29452, + "mean": 1.3793721888678152, + "std": 0.12439954558098618, + "min": 1.0127931833267212, + "max": 2.365194320678711, + "pct": { + "0.1": 1.0181231236457824, + "1": 1.1652055978775024, + "5": 1.2722984552383423, + "25": 1.33443021774292, + "50": 1.3540239334106445, + "75": 1.375470519065857, + "95": 1.5593847036361694, + "99": 2.1677620887756346, + "99.9": 2.1831804895401006 + } + }, + "gapin": { + "unit": "m", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 0.07156120898996962, + "std": 0.0432587754778901, + "min": 0.0, + "max": 0.5885139107704163, + "pct": { + "0.1": 0.0, + "1": 6.068613345178164e-08, + "5": 0.00017625917098484933, + "25": 0.04369092732667923, + "50": 0.07125337421894073, + "75": 0.08842182159423828, + "95": 0.16015855669975282, + "99": 0.17832967877388, + "99.9": 0.206968146562578 + } + }, + "rvsou": { + "unit": "m", + "n_ticks": 1490672, + "n_shots_available": 29452, + "mean": 1.3348156930912045, + "std": 0.10334221557069992, + "min": 1.0054652690887451, + "max": 2.3410043716430664, + "pct": { + "0.1": 1.0645662200450898, + "1": 1.134060994386673, + "5": 1.1750591039657592, + "25": 1.3031675815582275, + "50": 1.345410704612732, + "75": 1.3619457483291626, + "95": 1.4928356945514678, + "99": 1.6975986802577974, + "99.9": 2.168685009956361 + } + }, + "rvsiu": { + "unit": "m", + "n_ticks": 1481823, + "n_shots_available": 29452, + "mean": 1.0716172190205149, + "std": 0.0769388213615333, + "min": 1.0010124444961548, + "max": 2.136025905609131, + "pct": { + "0.1": 1.0059778497219085, + "1": 1.0113178491592407, + "5": 1.0127403736114502, + "25": 1.0159999132156372, + "50": 1.019310712814331, + "75": 1.1208724975585938, + "95": 1.2043283700942993, + "99": 1.2522118377685547, + "99.9": 2.034771483421327 + } + }, + "shafranov": { + "unit": "m", + "n_ticks": 2620593, + "n_shots_available": 29452, + "mean": 0.06288958668123741, + "std": 0.034055322691537854, + "min": -0.4082394540309906, + "max": 1.303265929222107, + "pct": { + "0.1": -0.005711350440979004, + "1": 0.006995668411254883, + "5": 0.017068004608154295, + "25": 0.03921254351735115, + "50": 0.05793106555938721, + "75": 0.0799604281783104, + "95": 0.12869288325309752, + "99": 0.16819702863693242, + "99.9": 0.21218299579620437 + } + }, + "zeta_ou": { + "unit": "dimensionless", + "n_ticks": 2620567, + "n_shots_available": 29452, + "mean": -0.121227767772112, + "std": 0.05779856128475274, + "min": -2.3985445499420166, + "max": 0.380886971950531, + "pct": { + "0.1": -0.3649558596014976, + "1": -0.30748181700706484, + "5": -0.23631144613027572, + "25": -0.14568214118480682, + "50": -0.11330334842205048, + "75": -0.08447503671050072, + "95": -0.04684258103370671, + "99": -0.019024645723402546, + "99.9": 0.020023215260360466 + } + }, + "zeta_ol": { + "unit": "dimensionless", + "n_ticks": 2620567, + "n_shots_available": 29452, + "mean": -0.1841641108903704, + "std": 0.11566216697760474, + "min": -2.413620710372925, + "max": 0.25255295634269714, + "pct": { + "0.1": -0.7207684978246689, + "1": -0.6321860718727111, + "5": -0.3719328552484512, + "25": -0.25750887393951416, + "50": -0.15683022141456604, + "75": -0.1041066087782383, + "95": -0.04005956836044792, + "99": 0.008554169535636834, + "99.9": 0.048173654310407044 + } + }, + "vloop": { + "unit": "V", + "n_ticks": 2721294, + "n_shots_available": 29473, + "mean": 0.3860928196706128, + "std": 0.8461846896364685, + "min": -11.052228927612305, + "max": 10.875903129577637, + "pct": { + "0.1": -4.470359791755676, + "1": -2.008943867683411, + "5": -0.7982482045888901, + "25": 0.04159998148679733, + "50": 0.2804970145225525, + "75": 0.6723037213087082, + "95": 1.931114912033081, + "99": 2.662202775478358, + "99.9": 4.445908463478533 + } + } + }, + "indicators": { + "efit_valid": { + "fraction_of_ticks_1": 0.9629951780292758 + }, + "vloop_valid": { + "fraction_of_ticks_1": 1.0 + }, + "rvsout_present": { + "fraction_of_ticks_1": 0.8557035733735495 + }, + "rvsou_present": { + "fraction_of_ticks_1": 0.5477805779162414 + }, + "rvsiu_present": { + "fraction_of_ticks_1": 0.5445288160705899 + } + }, + "units_check_rule": { + "span": "[pct 0.1, pct 99.9]", + "suspect_if_outside": "[pct0.1 - 3 * span_width, pct99.9 + 3 * span_width]", + "span_factor": 3.0, + "note": "a smoke test for unit errors, not a distribution-shift detector" + }, + "dataset": { + "root": "/lus/flare/projects/fusiondl_aesp/d3d_fuse_efit_v1", + "metadata_sha256": "306076a91e9853f61cbcec46ea9cf4e999760e7d02e887a3e4d90f6b6e6ed46c", + "stage1_sha256": "313005ab7d2db432f1048c6c8aaba600edd39b447a85cf355e0e7f564e59b7e7" + }, + "written_utc": "2026-11-08T22:50:46Z" +} diff --git a/era/single/model_config.json b/era/single/model_config.json new file mode 100644 index 0000000000000000000000000000000000000000..49e4ed32787e91dea440c87953acde5b4c53285d --- /dev/null +++ b/era/single/model_config.json @@ -0,0 +1,449 @@ +{ + "schema_version": 1, + "model": "FUSE-EFIT", + "protocol": "in era (random split of shots 125500-205774; DECISIONS D50, D55)", + "form": "single", + "form_meaning": "single: replicate 0 of the in-era finals, the frozen delivered network", + "members": [ + { + "run": "runs/FULLextfinal_era_r0", + "replicate": 0, + "seed": 100, + "checkpoint_sha256": "28390d5950ec18477394a85dc73498afa0f847502514251b7c96c97569632d96", + "config_sha256": "ddec260834c0f5fdaa5303382140e9c0bca1e3028ccd478c2c2a65f62d6f2398", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + } + ], + "cadence": { + "period_ms": 50.0, + "hz": 20, + "rule": "one step-graph call per 50 ms of simulated time; each tick describes the trailing interval (t - 50 ms, t]; reset the state to zeros at the start of every shot" + }, + "inputs": { + "inputs": { + "shape": [ + "batch", + 25 + ], + "dtype": "float32", + "names": [ + "pinj", + "tinj", + "ech_mw", + "gasa_cal", + "gasb_cal", + "gasc_cal", + "gasd_cal", + "gase_cal", + "bt", + "ip", + "aminor", + "rsurf", + "zsurf", + "kappa", + "tritop", + "tribot", + "drsep", + "rvsout", + "gapin", + "rvsou", + "rvsiu", + "shafranov", + "zeta_ou", + "zeta_ol", + "vloop" + ], + "units": { + "pinj": "MW", + "tinj": "N m", + "ech_mw": "MW", + "gasa_cal": "Torr L/s", + "gasb_cal": "Torr L/s", + "gasc_cal": "Torr L/s", + "gasd_cal": "Torr L/s", + "gase_cal": "Torr L/s", + "bt": "T", + "ip": "MA", + "aminor": "m", + "rsurf": "m", + "zsurf": "m", + "kappa": "dimensionless", + "tritop": "dimensionless", + "tribot": "dimensionless", + "drsep": "m", + "rvsout": "m", + "gapin": "m", + "rvsou": "m", + "rvsiu": "m", + "shafranov": "m", + "zeta_ou": "dimensionless", + "zeta_ol": "dimensionless", + "vloop": "V" + }, + "sources": { + "pinj": "PtData bmspinj: neutral-beam injected power, all sources", + "tinj": "PtData bmstinj: neutral-beam injected torque", + "ech_mw": "MDSplus \\RF::ECHPWRC: calibrated total ECH power injected", + "gasa_cal": "MDSplus NEUTRALS GASFLOW.GASA:FLOW: calibrated gas flow, valve A", + "gasb_cal": "MDSplus NEUTRALS GASFLOW.GASB:FLOW: calibrated gas flow, valve B", + "gasc_cal": "MDSplus NEUTRALS GASFLOW.GASC:FLOW: calibrated gas flow, valve C", + "gasd_cal": "MDSplus NEUTRALS GASFLOW.GASD:FLOW: calibrated gas flow, valve D", + "gase_cal": "MDSplus NEUTRALS GASFLOW.GASE:FLOW: calibrated gas flow, valve E", + "bt": "PtData bt: vacuum toroidal field, signed", + "ip": "PtData ip: measured plasma current (amperes / 1e6)", + "aminor": "EFIT01 AMINOR: minor radius", + "rsurf": "EFIT01 RSURF: major radius of the boundary's geometric centre", + "zsurf": "EFIT01 ZSURF: height of the boundary's geometric centre", + "kappa": "EFIT01 KAPPA: elongation", + "tritop": "EFIT01 TRITOP: upper triangularity", + "tribot": "EFIT01 TRIBOT: lower triangularity", + "drsep": "EFIT01 DRSEP: separatrix separation at the outer midplane, clipped to +-0.1 m per slice", + "rvsout": "EFIT01 RVSOUT: major radius of the outer (lower) strike point", + "gapin": "EFIT01 GAPIN: inner gap", + "rvsou": "EFIT01 RVSOU: major radius of the upper outer strike point", + "rvsiu": "EFIT01 RVSIU: major radius of the upper inner strike point", + "shafranov": "EFIT01 R0 - RSURF: Shafranov shift", + "zeta_ou": "Luce squareness, outer-upper quadrant, from the EFIT01 boundary vertices", + "zeta_ol": "Luce squareness, outer-lower quadrant, from the EFIT01 boundary vertices", + "vloop": "PtData VLOOP: loop voltage" + }, + "grid_rule": { + "pinj": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "tinj": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "ech_mw": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "gasa_cal": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "gasb_cal": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "gasc_cal": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "gasd_cal": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "gase_cal": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "bt": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "ip": "plain mean of the three newest 20 ms samples at or before the tick, after a causal low-pass and hold onto 20 ms (INPUT_CONTRACT 3.1)", + "aminor": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "rsurf": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "zsurf": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "kappa": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "tritop": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "tribot": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "drsep": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "rvsout": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "gapin": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "rvsou": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "rvsiu": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "shafranov": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "zeta_ou": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "zeta_ol": "mean of the per-slice values of the EFIT01 slices in (t - 50 ms, t] (INPUT_CONTRACT 3.2)", + "vloop": "mean of the native samples in (t - 50 ms, t] (INPUT_CONTRACT 3.3)" + }, + "zeroed_when_indicator_is_0": { + "pinj": [], + "tinj": [], + "ech_mw": [], + "gasa_cal": [], + "gasb_cal": [], + "gasc_cal": [], + "gasd_cal": [], + "gase_cal": [], + "bt": [], + "ip": [], + "aminor": [ + "efit_valid" + ], + "rsurf": [ + "efit_valid" + ], + "zsurf": [ + "efit_valid" + ], + "kappa": [ + "efit_valid" + ], + "tritop": [ + "efit_valid" + ], + "tribot": [ + "efit_valid" + ], + "drsep": [ + "efit_valid" + ], + "rvsout": [ + "efit_valid", + "rvsout_present" + ], + "gapin": [ + "efit_valid" + ], + "rvsou": [ + "efit_valid", + "rvsou_present" + ], + "rvsiu": [ + "efit_valid", + "rvsiu_present" + ], + "shafranov": [ + "efit_valid" + ], + "zeta_ou": [ + "efit_valid" + ], + "zeta_ol": [ + "efit_valid" + ], + "vloop": [ + "vloop_valid" + ] + }, + "note": "Physical units, contract order (docs/INPUT_CONTRACT.md \u00a72). Where a governing indicator is 0 the value is ignored (any number, or NaN). NaN anywhere is read as the training mean, so never pass NaN for a value you have." + }, + "indicators": { + "shape": [ + "batch", + 5 + ], + "dtype": "float32", + "values": "0 or 1, per tick", + "names": [ + "efit_valid", + "vloop_valid", + "rvsout_present", + "rvsou_present", + "rvsiu_present" + ], + "meaning": { + "efit_valid": "1 when at least one usable EFIT slice lies in (t - 50 ms, t]; 0 otherwise", + "vloop_valid": "1 when at least one loop-voltage sample lies in (t - 50 ms, t]; 0 otherwise", + "rvsout_present": "1 when at least one slice in the window has a real outer strike point; 0 otherwise", + "rvsou_present": "1 when at least one slice in the window has a real upper outer strike point; 0 otherwise", + "rvsiu_present": "1 when at least one slice in the window has a real upper inner strike point; 0 otherwise" + } + }, + "available": { + "shape": [ + "batch", + 25 + ], + "dtype": "float32", + "values": "0 or 1, per shot", + "names": [ + "pinj", + "tinj", + "ech_mw", + "gasa_cal", + "gasb_cal", + "gasc_cal", + "gasd_cal", + "gase_cal", + "bt", + "ip", + "aminor", + "rsurf", + "zsurf", + "kappa", + "tritop", + "tribot", + "drsep", + "rvsout", + "gapin", + "rvsou", + "rvsiu", + "shafranov", + "zeta_ou", + "zeta_ol", + "vloop" + ], + "default": 1, + "note": "1 = a usable record of this channel exists for the shot (the normal case). 0 = no record for the whole shot: the value is ignored and the model receives the flag, as it did in training for missing records. Keep it constant within a shot." + } + }, + "outputs": { + "predictions": { + "shape": [ + "batch", + 9 + ], + "dtype": "float32", + "names": [ + "ne", + "te_ped", + "ti_ped", + "t_rot_ped", + "ne_knee", + "te_knee", + "rho_sym", + "ne_top_loc", + "hmode" + ], + "units": { + "ne": "1e19 m^-3", + "te_ped": "keV", + "ti_ped": "keV", + "t_rot_ped": "krad/s", + "ne_knee": "1e19 m^-3", + "te_knee": "keV", + "rho_sym": "rho (normalised radius)", + "ne_top_loc": "rho (normalised radius)", + "hmode": "probability in [0, 1]" + }, + "meaning": { + "ne": "electron density at rho = 0.85", + "te_ped": "electron temperature at rho = 0.85", + "ti_ped": "ion temperature at rho = 0.85", + "t_rot_ped": "toroidal rotation at rho = 0.85", + "ne_knee": "electron density on the pedestal fit at its knee (H-mode only)", + "te_knee": "electron temperature on its pedestal fit at its knee (H-mode only)", + "rho_sym": "symmetry point of the density pedestal fit (H-mode only)", + "ne_top_loc": "knee (pedestal top) of the density pedestal fit (H-mode only)", + "hmode": "the plasma is in H-mode (sigmoid of the averaged or single logit)" + } + }, + "hmode_gated_heads": [ + "ne_knee", + "te_knee", + "rho_sym", + "ne_top_loc" + ], + "hmode_gated_note": "Trained on H-mode ticks only and undefined in L-mode; the graph emits a number anyway. Report them only where predictions[hmode] >= threshold; otherwise treat them as undefined, never as 0.", + "hmode_thresholds": { + "frozen": { + "balanced": 0.54, + "conservative": 0.5 + }, + "definitions": { + "balanced": "maximum Youden's J on validation (the best trade between missed H-mode and admitted L-mode ticks)", + "conservative": "the lowest threshold keeping L-mode ticks at or below 5 % of admitted validation ticks" + }, + "set_on": "replicate 0, in-era validation split", + "source": "receipts/G5_freeze.md section 3; receipts/G5_freeze.json gate_thresholds.era", + "freeze_record_sha256": "1fbd776750736a6995a5de48b74b16bc13e0a2a1539972e46be23e8dbb49316e", + "note": "Gate the four H-mode-only heads on predictions[hmode] >= threshold; MODEL_CARD.md \u00a76." + } + }, + "graphs": { + "step": { + "file": "fuse_efit_single_step.onnx", + "purpose": "one 50 ms tick per call; unbounded shot length", + "inputs": { + "inputs": [ + "batch", + 25 + ], + "indicators": [ + "batch", + 5 + ], + "available": [ + "batch", + 25 + ], + "conv_state": [ + 6, + "batch", + 1792, + 3 + ], + "ssm_state": [ + 6, + "batch", + 12, + 128, + 64 + ] + }, + "outputs": { + "predictions": [ + "batch", + 9 + ], + "conv_state_out": [ + 6, + "batch", + 1792, + 3 + ], + "ssm_state_out": [ + 6, + "batch", + 12, + 128, + 64 + ] + } + }, + "sequence": { + "file": "fuse_efit_single_sequence.onnx", + "seq_len": 256, + "purpose": "a whole window of exactly seq_len ticks; right-pad a shorter shot (any finite values, indicators 1) and keep the first K outputs, which is exact because the model is causal; use the step graph for longer shots", + "inputs": { + "inputs": [ + "batch", + 256, + 25 + ], + "indicators": [ + "batch", + 256, + 5 + ], + "available": [ + "batch", + 25 + ] + }, + "outputs": { + "predictions": [ + "batch", + 256, + 9 + ] + } + } + }, + "state": { + "conv_state": [ + "n_members x n_layers", + "batch", + 1792, + 3 + ], + "ssm_state": [ + "n_members x n_layers", + "batch", + 12, + 128, + 64 + ], + "leading_axis": 6, + "n_members": 1, + "n_layers": 6, + "initial": "all zeros at the start of every shot", + "bytes_per_shot": 2488320, + "note": "Opaque: store what the step graph returns and pass it back on the next call. The two forms differ only in the leading axis of these two tensors." + }, + "architecture": { + "family": "Mamba-2 state-space sequence model", + "d_model": 768, + "n_layers": 6, + "d_state": 64, + "d_conv": 4, + "expand": 2, + "headdim": 128, + "nheads": 12, + "ngroups": 2, + "d_inner": 1536, + "conv_dim": 1792, + "chunk_size": 100, + "n_inputs_trunk": 30, + "n_params_per_member": 22882785, + "n_members": 1 + }, + "input_transform": { + "clip_sigma": 20.0, + "std_floor": 1e-06, + "file": "norms.json", + "applied": "inside the graphs" + }, + "dtype": "float32", + "onnx_opset": 17, + "documentation": "docs/EXPORT.md, docs/INPUT_CONTRACT.md, MODEL_CARD.md" +} diff --git a/era/single/norms.json b/era/single/norms.json new file mode 100644 index 0000000000000000000000000000000000000000..a201d141aee4cc0f61f29ab5d3bbd8c1d1de9508 --- /dev/null +++ b/era/single/norms.json @@ -0,0 +1,294 @@ +{ + "schema_version": 1, + "note": "The statistics baked into the graphs, for inspection and for reproducing the transform outside them. A host does not need this file to run the model.", + "input_transform": "z = clip((x - mean) / std, -clip_sigma, +clip_sigma) per channel, x in physical units; not-a-number -> 0; then z -> 0 where the channel is unavailable or a governing indicator is 0", + "clip_sigma": 20.0, + "std_floor": 1e-06, + "inputs": { + "names": [ + "pinj", + "tinj", + "ech_mw", + "gasa_cal", + "gasb_cal", + "gasc_cal", + "gasd_cal", + "gase_cal", + "bt", + "ip", + "aminor", + "rsurf", + "zsurf", + "kappa", + "tritop", + "tribot", + "drsep", + "rvsout", + "gapin", + "rvsou", + "rvsiu", + "shafranov", + "zeta_ou", + "zeta_ol", + "vloop" + ], + "units": [ + "MW", + "N m", + "MW", + "Torr L/s", + "Torr L/s", + "Torr L/s", + "Torr L/s", + "Torr L/s", + "T", + "MA", + "m", + "m", + "m", + "dimensionless", + "dimensionless", + "dimensionless", + "m", + "m", + "m", + "m", + "m", + "m", + "dimensionless", + "dimensionless", + "V" + ], + "mean": [ + 3.942431288688486, + 2.2096625295179186, + 0.4654761552810669, + 15.061767862270832, + 1.4919341408834326, + 0.23709206776972092, + 0.5197598621986353, + 0.021391137846201724, + -0.9720653400720033, + 0.8316150307655334, + 0.589589536190033, + 1.677773356437683, + -0.05055605247616768, + 1.7517046928405762, + 0.3966327905654907, + 0.5042979121208191, + -0.015922507271170616, + 1.3765016794204712, + 0.06946969032287598, + 1.3273015022277832, + 1.0669854879379272, + 0.06224634870886803, + -0.12007330358028412, + -0.18449491262435913, + 0.38771408796310425 + ], + "std": [ + 3.195729724075188, + 2.217424308626617, + 0.9441152811050415, + 26.64435504465176, + 6.993835352190119, + 1.6900931025396266, + 3.7040796936604687, + 0.10363119099527826, + 1.6484726180777753, + 0.6177622675895691, + 0.02114672213792801, + 0.027116550132632256, + 0.0815875306725502, + 0.14088328182697296, + 0.23491179943084717, + 0.24562624096870422, + 0.06496237963438034, + 0.12265536934137344, + 0.04288293793797493, + 0.09615185856819153, + 0.06577663868665695, + 0.03295154869556427, + 0.054369814693927765, + 0.10875540971755981, + 0.7761709094047546 + ] + }, + "stages": { + "note": "The composed statistics above are stage 2 applied after stage 1: mean = m1 + s1 * m2, std = s1 * s2. Stage 1 is the dataset's stored scale (identity except for the beam, gas and field channels); stage 2 is the in-era training-split standardisation.", + "stage1_physical_to_stored": { + "mean": [ + 2.8111997039100878, + 2.154143940948575, + 0.0, + 14.89178144369171, + 1.9421402622606716, + 0.7508911827356307, + 1.0383906373403984, + 0.3920832239686922, + -1.0310375752078498, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + "std": [ + 194.08418888726106, + 2.3684465859740262, + 1.0, + 27.289184462156058, + 11.092415079529571, + 9.017289768908354, + 12.055982101097918, + 6.498888909025979, + 1.599000778986496, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + }, + "stage2_stored_to_model": { + "mean": [ + 0.005828561261296272, + 0.023440929129719734, + 0.4654761552810669, + 0.006229076534509659, + -0.040586844086647034, + -0.05697932839393616, + -0.04301854223012924, + -0.057039301842451096, + 0.03688067942857742, + 0.8316150307655334, + 0.589589536190033, + 1.677773356437683, + -0.05055605247616768, + 1.7517046928405762, + 0.3966327905654907, + 0.5042979121208191, + -0.015922507271170616, + 1.3765016794204712, + 0.06946969032287598, + 1.3273015022277832, + 1.0669854879379272, + 0.06224634870886803, + -0.12007330358028412, + -0.18449491262435913, + 0.38771408796310425 + ], + "std": [ + 0.01646568812429905, + 0.9362357258796692, + 0.9441152811050415, + 0.9763705134391785, + 0.6305060982704163, + 0.1874280571937561, + 0.30723997950553894, + 0.015945985913276672, + 1.0309392213821411, + 0.6177622675895691, + 0.02114672213792801, + 0.027116550132632256, + 0.0815875306725502, + 0.14088328182697296, + 0.23491179943084717, + 0.24562624096870422, + 0.06496237963438034, + 0.12265536934137344, + 0.04288293793797493, + 0.09615185856819153, + 0.06577663868665695, + 0.03295154869556427, + 0.054369814693927765, + 0.10875540971755981, + 0.7761709094047546 + ] + } + }, + "indicators": { + "names": [ + "efit_valid", + "vloop_valid", + "rvsout_present", + "rvsou_present", + "rvsiu_present" + ], + "transform": "none: 0/1 passed as they are (read as 1 when > 0.5)" + }, + "targets": { + "ne": { + "mean": 2.75117452029956, + "std": 1.6541537951642646, + "unit": "1e19 m^-3" + }, + "te_ped": { + "mean": 0.5915626266199993, + "std": 0.43467429211593894, + "unit": "keV" + }, + "ti_ped": { + "mean": 1.0168501881070604, + "std": 0.6810960596049213, + "unit": "keV" + }, + "t_rot_ped": { + "mean": 21.24461452086136, + "std": 16.5914840454496, + "unit": "krad/s" + }, + "ne_knee": { + "mean": 2.4166156855194076, + "std": 1.5067549102828321, + "unit": "1e19 m^-3" + }, + "te_knee": { + "mean": 0.44874806504511355, + "std": 0.33939948718776175, + "unit": "keV" + }, + "rho_sym": { + "mean": 0.9757616411014167, + "std": 0.04329206963559261, + "unit": "rho (normalised radius)" + }, + "ne_top_loc": { + "mean": 0.9261865006629387, + "std": 0.04989716973523974, + "unit": "rho (normalised radius)" + } + }, + "hmode": { + "transform": "probability = sigmoid(logit); in the averaged form the logit is the mean of the members' logits" + }, + "source": { + "dataset_root": "/lus/flare/projects/fusiondl_aesp/d3d_fuse_efit_v1", + "norms_file": "norms.json", + "norms_sha256": "e28b8331a042054543dc97c49d977372012cfbb86119c276b536a1e945f5e926", + "stage1_sha256": "313005ab7d2db432f1048c6c8aaba600edd39b447a85cf355e0e7f564e59b7e7", + "metadata_sha256": "306076a91e9853f61cbcec46ea9cf4e999760e7d02e887a3e4d90f6b6e6ed46c" + } +} diff --git a/era/single/provenance.json b/era/single/provenance.json new file mode 100644 index 0000000000000000000000000000000000000000..005944d425d14f9d82da0c3b05006c974caff1ec --- /dev/null +++ b/era/single/provenance.json @@ -0,0 +1,80 @@ +{ + "schema_version": 1, + "model": "FUSE-EFIT", + "form": "single", + "exported_utc": "2026-11-08T22:50:53Z", + "host": "x4217c6s0b0n0", + "members": [ + { + "run": "runs/FULLextfinal_era_r0", + "replicate": 0, + "seed": 100, + "checkpoint_sha256": "28390d5950ec18477394a85dc73498afa0f847502514251b7c96c97569632d96", + "config_sha256": "ddec260834c0f5fdaa5303382140e9c0bca1e3028ccd478c2c2a65f62d6f2398", + "trained_code_sha256": "1095cd5859ce819840f3e35ead3243d28aae832dbd3f54b04b90d98330493290" + } + ], + "freeze_record": { + "path": "receipts/G5_freeze.json", + "sha256": "1fbd776750736a6995a5de48b74b16bc13e0a2a1539972e46be23e8dbb49316e" + }, + "dataset": { + "root": "/lus/flare/projects/fusiondl_aesp/d3d_fuse_efit_v1", + "norms_file": "norms.json", + "norms_sha256": "e28b8331a042054543dc97c49d977372012cfbb86119c276b536a1e945f5e926", + "stage1_sha256": "313005ab7d2db432f1048c6c8aaba600edd39b447a85cf355e0e7f564e59b7e7", + "metadata_sha256": "306076a91e9853f61cbcec46ea9cf4e999760e7d02e887a3e4d90f6b6e6ed46c" + }, + "exporter": "torch.onnx.export, TorchScript path (dynamo=False), do_constant_folding", + "onnx_opset": 17, + "seq_len": 256, + "code": { + "code_sha256": "fdeb0962110362492e04d06d51af130c716c57c3050e7dfe13766177529730da", + "code_sha256_rule": "tools/code_snapshot.py: sha256 over fuse_efit/, tests/, tools/, pbs/", + "files": { + "examples/run_model.py": "aaff89b5f24096c80b43336baedabadff629b688b6543d8187792193c6795075", + "examples/verify_integration.py": "39d0cf9f13262d9a2ebe2281ebe0e808b1b963e2e95a1042cd3f65c8b1dcd4aa", + "fuse_efit/export/__init__.py": "404033894bba4772bbec986bb151f4478faa45fe9bf39c4d5e2722e85377517c", + "fuse_efit/export/contract.py": "de13fe7a8f39db77a351002fbcf8734db93251e0692b37292e842d022c20b561", + "fuse_efit/export/export_onnx.py": "cef50775b39f6164e4943305976665f386423d61a3a414fa751768007799e923", + "fuse_efit/export/graphs.py": "13056c2ebe06a104f94c83ebaea0752bf97941945e6797a8d49f8f3ce9861a4d", + "fuse_efit/export/input_ranges.py": "287d8cbf97163982a98e573e7dcb021fa29e860c4b4f20ac76a0870fdb1b1655", + "fuse_efit/export/make_reference.py": "dbd20fa4ffd5a2dbe668245f32c86171a2ecc349a768f95bc62c498d28d3d48e", + "fuse_efit/export/runtime.py": "a70d08d661ebbfd5b4992ff0a6598e28bbf04c1a674eb97589420985f3068a67", + "fuse_efit/export/step.py": "dee8e5ef7d0d843d9ddf25dee40c93199dba6a3afab0042b929831ae49b7af50", + "fuse_efit/export/timing.py": "ab9f4f8b35fead7c22f8c0b0e3b9153e3f660c8d8857a1e22bdb188ca8b56669", + "fuse_efit/export/val_shots.py": "d26c4c20e7c95cae8f3204cc94e60fd897a932cb5db9b24733d0041f654981eb", + "fuse_efit/export/validate_onnx.py": "93c907a2d1bd2b2d38497f93183bba6d5ff4e0813d9d1ce0f3e2f65404837625" + } + }, + "versions": { + "torch": "2.13.0a0+gitcf30153", + "numpy": "2.3.5", + "python": "3.12.12", + "onnx": "1.23.1", + "onnxruntime": "1.30.0" + }, + "platform": "Linux-6.4.0-150700.53.78-default-x86_64-with-glibc2.38", + "artifacts": { + "fuse_efit_single_step.onnx": { + "bytes": 91586758, + "sha256": "3ffc20851386cf7db9f81792e6b247d179229901c9e615d61c8982174e658c76" + }, + "fuse_efit_single_sequence.onnx": { + "bytes": 91967120, + "sha256": "ddda4e5ed0c3c9aba626ccfea0115863c75d9b71c97b7e44a955919f77b3fac4" + }, + "model_config.json": { + "bytes": 15429, + "sha256": "9e3ae66bbc5e1333cba705bfd7173ba189b19e32c86fbda64a5035d6ea80d9ac" + }, + "norms.json": { + "bytes": 7130, + "sha256": "487fa5c79f1e4f58db2df41b239d954e6006d4cc6118228ed9e4241189402ea9" + }, + "input_ranges.json": { + "bytes": 15628, + "sha256": "03f5af87195cb7e9746a320bf0070d05b53234e54a6d2e012a6ebd346e64f98d" + } + } +} diff --git a/manifest.json b/manifest.json index 9a7946c5af3eeea2f1276cb53664036a7c544a9f..29ff07f65d79f9190c773a8ba02545e1fdeab0c7 100644 --- a/manifest.json +++ b/manifest.json @@ -1,323 +1,70 @@ { - "schema_version": 2, - "model": "fuse29", - "repo_id": "SCS-Lab/FUSE29-Pedestal-model", - "default_seed": 0, - "onnx_opset": 17, - "actuator_space": "physical", - "heads": [ - "ne", - "te_ped", - "ti_ped", - "t_rot_ped", - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc", - "hmode" - ], - "actuators": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "hmode_gated_heads": [ - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc" - ], - "note": "Eight independently trained seeds, differing only in weight initialisation and data ordering. s0 is the locked champion and the default. The others exist so a consumer can measure spread across training runs; they are not a jointly trained ensemble, and averaging them is a choice rather than the intended use.", - "bundles": [ - { - "seed": 0, - "path": "s0", - "default": true, - "val_loss": 1.1169083155691624, - "seq_len": 256, - "files": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "9150698ab06af368eec857ea429191bf8a0593e9fd9d7e571bb7ce5bcbcf853a" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "0274ad98cc51ee938422f3c9febd3c3cf3141a35d39ff2a62efeb75f9ce43577" - }, - "model_config.json": { - "bytes": 7112, - "sha256": "10779e134e2f65f92ef6955833c7b2af73119e069e2e31c2cfb0be563bc0bf3b" - }, - "norms.json": { - "bytes": 7840, - "sha256": "f39e579358c10911e79f2bfca2f38f76549e86462a4952ff68f009da0aca8118" - }, - "actuator_ranges.json": { - "bytes": 17917, - "sha256": "ccc717f12f66944e120b4a01dbf4ddd090c444ceff50a2613d0992a765b92a44" - }, - "provenance.json": { - "bytes": 1198, - "sha256": "e948d64c89bf320d0b747624e69ce86e6f645c2a9d7a9096bdb8efa149e47b36" - } - } + "schema_version": 1, + "model": "FUSE-EFIT", + "protocol": "in era", + "repo_id": "SCS-Lab/FUSE-PED", + "license": "mit", + "code": "https://github.com/NoahH72/FUSE-Pedestal-Predictor-Mamba-ONNX", + "forms": { + "single": { + "path": "era/single", + "members": 1 }, - { - "seed": 1, - "path": "s1", - "default": false, - "val_loss": 1.1129196528345346, - "seq_len": 256, - "files": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "8780126cca821664426bafdd896a1313846da69ad120b9c591d90dc0cc21249e" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "3469221c38b1006a017506969d2ffd5f9b84a9a34d22b4429184a299c2438f4a" - }, - "model_config.json": { - "bytes": 7112, - "sha256": "337fb9444a95c26d458a48cb8bbf83d16fa62436b509a8e9ad5fd9c424b1a55a" - }, - "norms.json": { - "bytes": 7840, - "sha256": "f39e579358c10911e79f2bfca2f38f76549e86462a4952ff68f009da0aca8118" - }, - "actuator_ranges.json": { - "bytes": 17917, - "sha256": "ccc717f12f66944e120b4a01dbf4ddd090c444ceff50a2613d0992a765b92a44" - }, - "provenance.json": { - "bytes": 1198, - "sha256": "7e4895c944d4423e4fee54a887652ead81d158684a996a05cdebb5ba7aa21962" - } - } + "averaged": { + "path": "era/averaged", + "members": 8 + } + }, + "default_form": "single", + "files": { + "era/averaged/fuse_efit_averaged_sequence.onnx": { + "bytes": 735805697, + "sha256": "cd3eaabcc7f7727e273f8063cb7d52bd324c287d42e62bbae4eeebb32b5b00ec" + }, + "era/averaged/fuse_efit_averaged_step.onnx": { + "bytes": 732659205, + "sha256": "8d19844716b817216035a72b480d24326c7fe28a64dbf17f8a9ea53178ea359e" + }, + "era/averaged/input_ranges.json": { + "bytes": 15628, + "sha256": "03f5af87195cb7e9746a320bf0070d05b53234e54a6d2e012a6ebd346e64f98d" + }, + "era/averaged/model_config.json": { + "bytes": 18269, + "sha256": "27697f17523ac6d8e5da69abded17827b566aaadc57be46f77138831d2b7535c" + }, + "era/averaged/norms.json": { + "bytes": 7130, + "sha256": "487fa5c79f1e4f58db2df41b239d954e6006d4cc6118228ed9e4241189402ea9" + }, + "era/averaged/provenance.json": { + "bytes": 6405, + "sha256": "1b76be85374bb2a944a9557ff3ab5c86ffde72f9ccbb29525dcb72e34058da5c" }, - { - "seed": 2, - "path": "s2", - "default": false, - "val_loss": 1.119664316996932, - "seq_len": 256, - "files": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "b696b9c645441cde3881ff796aaec6e1927335daba4539095f6b6dee8a5768f4" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "1fc339449427dfe47ee425eb7ff500887e6a10ae1ef32d90207f2d1e3a828cf3" - }, - "model_config.json": { - "bytes": 7111, - "sha256": "3f4859e8942bedcedb8860a50d6150f6189860868a2236094079c58fae273f2d" - }, - "norms.json": { - "bytes": 7840, - "sha256": "f39e579358c10911e79f2bfca2f38f76549e86462a4952ff68f009da0aca8118" - }, - "actuator_ranges.json": { - "bytes": 17917, - "sha256": "ccc717f12f66944e120b4a01dbf4ddd090c444ceff50a2613d0992a765b92a44" - }, - "provenance.json": { - "bytes": 1198, - "sha256": "86a2e05a5af2851c400d6f5d5847832e5cee0f079bc4f8223f380c953dff336c" - } - } + "era/single/fuse_efit_single_sequence.onnx": { + "bytes": 91967120, + "sha256": "ddda4e5ed0c3c9aba626ccfea0115863c75d9b71c97b7e44a955919f77b3fac4" }, - { - "seed": 3, - "path": "s3", - "default": false, - "val_loss": 1.1190400626510382, - "seq_len": 256, - "files": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "f2b80d7f732cef7a21eb21e606cf4a3e63aa4a91a9ff6dde789d88e07fcd5418" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "ab580c091de0471edc8454085dcda9c88650e4995be5c2ec6bd7f8b1c87d7786" - }, - "model_config.json": { - "bytes": 7112, - "sha256": "cea93ee7706b95023550a1085349bb581679c05695ab7aba421f157c51d19c93" - }, - "norms.json": { - "bytes": 7840, - "sha256": "f39e579358c10911e79f2bfca2f38f76549e86462a4952ff68f009da0aca8118" - }, - "actuator_ranges.json": { - "bytes": 17917, - "sha256": "ccc717f12f66944e120b4a01dbf4ddd090c444ceff50a2613d0992a765b92a44" - }, - "provenance.json": { - "bytes": 1198, - "sha256": "0cdcf038de7a1a94fe1f763dd5f69d5f6aff58abf74d168a9864caaa1827331c" - } - } + "era/single/fuse_efit_single_step.onnx": { + "bytes": 91586758, + "sha256": "3ffc20851386cf7db9f81792e6b247d179229901c9e615d61c8982174e658c76" }, - { - "seed": 4, - "path": "s4", - "default": false, - "val_loss": 1.1320768278092146, - "seq_len": 256, - "files": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "7c74bffd61e2c69cae1b8b182fbde8897ce971901d83beded7f6a2e0c919fedc" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "2348d2e1930835363dfade74cfc47d46c88e0691693f60e85cffc2d459ecf774" - }, - "model_config.json": { - "bytes": 7112, - "sha256": "a7539aaf67b322d787944dfd191feedc2b9373fb5958f763b171869578e41258" - }, - "norms.json": { - "bytes": 7840, - "sha256": "f39e579358c10911e79f2bfca2f38f76549e86462a4952ff68f009da0aca8118" - }, - "actuator_ranges.json": { - "bytes": 17917, - "sha256": "ccc717f12f66944e120b4a01dbf4ddd090c444ceff50a2613d0992a765b92a44" - }, - "provenance.json": { - "bytes": 1198, - "sha256": "47883a9d25d4a0ee5fb8e6d31464442420afbb59ecde6a4e7206f505848aec6d" - } - } + "era/single/input_ranges.json": { + "bytes": 15628, + "sha256": "03f5af87195cb7e9746a320bf0070d05b53234e54a6d2e012a6ebd346e64f98d" }, - { - "seed": 5, - "path": "s5", - "default": false, - "val_loss": 1.1122196558862925, - "seq_len": 256, - "files": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "1e10c13fc85dd992fafbaddc8b3dd01d11aabaf757e3e125329a699d298a6a11" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "bee461499d85d1cf7ce5b4f5f56ab1bf13b55066737c08147e860211b0091ff3" - }, - "model_config.json": { - "bytes": 7112, - "sha256": "77e00af4f5099967eb06c910400cb2ae892d097a9944b4e7e19751066bc0a2ca" - }, - "norms.json": { - "bytes": 7840, - "sha256": "f39e579358c10911e79f2bfca2f38f76549e86462a4952ff68f009da0aca8118" - }, - "actuator_ranges.json": { - "bytes": 17917, - "sha256": "ccc717f12f66944e120b4a01dbf4ddd090c444ceff50a2613d0992a765b92a44" - }, - "provenance.json": { - "bytes": 1198, - "sha256": "13204b19314a50bcb0e7228e79a9c64de4237bae6d6da4bd483a3ca4bdb3ebf4" - } - } + "era/single/model_config.json": { + "bytes": 15429, + "sha256": "9e3ae66bbc5e1333cba705bfd7173ba189b19e32c86fbda64a5035d6ea80d9ac" }, - { - "seed": 6, - "path": "s6", - "default": false, - "val_loss": 1.1161801163107157, - "seq_len": 256, - "files": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "36b55e194e705e0a1d1087c1164e4f72f2507784b1210a0ce2f94fa151db04fa" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "ca3570ae8e579c638d9195f6f7e3c4634bc61425cc51c7998a53818cb8c18ddb" - }, - "model_config.json": { - "bytes": 7112, - "sha256": "6107c3d463829d896ae229483595fe421f406925361774ff2b6e63bc9cf3ca40" - }, - "norms.json": { - "bytes": 7840, - "sha256": "f39e579358c10911e79f2bfca2f38f76549e86462a4952ff68f009da0aca8118" - }, - "actuator_ranges.json": { - "bytes": 17917, - "sha256": "ccc717f12f66944e120b4a01dbf4ddd090c444ceff50a2613d0992a765b92a44" - }, - "provenance.json": { - "bytes": 1198, - "sha256": "7cb93660689bffca0315d1bf5c1b1ffb2247b7c2e512cc0fdd9dc30037955140" - } - } + "era/single/norms.json": { + "bytes": 7130, + "sha256": "487fa5c79f1e4f58db2df41b239d954e6006d4cc6118228ed9e4241189402ea9" }, - { - "seed": 7, - "path": "s7", - "default": false, - "val_loss": 1.112956801429391, - "seq_len": 256, - "files": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "abf72130ad644f7bf2883c39f336536ad839ae7f609cc88d28a5366459e1693c" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "db040b029538d47b404e9864538fb0c550285081ecce7348ad6fd231fdd7bbcf" - }, - "model_config.json": { - "bytes": 7111, - "sha256": "7cfbcd1b3b9e50836dc7de9f312db9c70931afcc105dca1dd184d17c65f99d75" - }, - "norms.json": { - "bytes": 7840, - "sha256": "f39e579358c10911e79f2bfca2f38f76549e86462a4952ff68f009da0aca8118" - }, - "actuator_ranges.json": { - "bytes": 17917, - "sha256": "ccc717f12f66944e120b4a01dbf4ddd090c444ceff50a2613d0992a765b92a44" - }, - "provenance.json": { - "bytes": 1198, - "sha256": "687b3a1f6adfb5d4b2834bf1b5fc62f909dfdbb5812e81b82bef6784cef865f7" - } - } + "era/single/provenance.json": { + "bytes": 3758, + "sha256": "c481b3f5b07bcb2532bb725629172263e78181752b65641bc27451d3e80a480e" } - ] + }, + "prepared_utc": "2026-11-09T16:40:37Z" } diff --git a/s0/README.md b/s0/README.md deleted file mode 100644 index 2c6fda3fb4751ca0418a0775584a6a087dc058d0..0000000000000000000000000000000000000000 --- a/s0/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -license: mit -library_name: onnx -tags: - - onnx - - fusion - - plasma-physics - - tokamak - - diii-d - - mamba ---- - -# fuse29 — seed 0 - -**This is the champion seed and the default.** `Fuse29Predictor.from_pretrained()` with no seed argument loads it, and every number in the root model card refers to it. - -29-input Mamba-2 pedestal predictor for DIII-D. Raw physical units in, -physical units out. See the [root model card](https://huggingface.co/SCS-Lab/FUSE29-Pedestal-model) -for the full description, I/O contract, accuracy and limitations. - -| | | -|---|---| -| Seed | 0 | -| Parameters | 11,254,425 | -| Best validation loss | 1.1169 | -| Sequence graph length | 256 ticks | -| ONNX opset | 17 | -| Exported | 2026-09-03T00:46:21.979021+00:00 | -| Source checkpoint SHA-256 | `875ff7248c0bfde3…` | - -## Load - -```python -from fuse29.runtime import Fuse29Predictor - -predictor = Fuse29Predictor.from_pretrained("SCS-Lab/FUSE29-Pedestal-model", seed=0) -``` - -## Files - -| File | | -|---|---| -| `fuse29_step.onnx` | one 50 ms tick, carries state, no length limit | -| `fuse29_seq.onnx` | whole shot at a fixed 256 ticks | -| `model_config.json` | I/O contract: names, order, units, sources, shapes | -| `norms.json` | the statistics baked into the graphs | -| `actuator_ranges.json` | training-split distribution, for checking your units | -| `provenance.json` | source checkpoint hash, library versions, artefact hashes | - -## Before you use it - -- Four heads (`neped_prmtan`, `teped_prmtan`, `rho_sym`, `ne_top_loc`) are - **only valid in H-mode** and the graph does not gate them. Gate on the - model's own `hmode` output. -- `pinj` is in **MW**, not W. Run `predictor.check_units(shot)` once. -- Output column order is not alphabetical. See `model_config.json`. diff --git a/s0/actuator_ranges.json b/s0/actuator_ranges.json deleted file mode 100644 index 08d19f4e80f49e6bbd18c40674b06946a02cc61a..0000000000000000000000000000000000000000 --- a/s0/actuator_ranges.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "schema_version": 1, - "note": "Physical-units distribution of each actuator over the training split. Use it to check that your signals are in the units the graph expects; a unit error is the one preprocessing mistake that produces confident nonsense rather than an exception.", - "split": "train", - "n_shots": 32731, - "n_ticks": 3020926, - "percentiles": [ - 0.1, - 1, - 5, - 25, - 50, - 75, - 95, - 99, - 99.9 - ], - "channels": { - "pinj": { - "units": "MW", - "source": "ptdata:bmspinj", - "description": "Neutral beam injected power, all sources.", - "min": -46005.02701919088, - "max": 17.512712760455507, - "mean": 3.838883638381958, - "std": 3.0613932609558105, - "pct": { - "0.1": -0.004132416388869853, - "1": 4.112187479421436e-09, - "5": 4.112187479421436e-09, - "25": 1.311169336894574, - "50": 3.18466408866965, - "75": 5.748764762873332, - "95": 9.841882532311711, - "99": 12.212702351352696, - "99.9": 14.791924355083399 - } - }, - "tinj": { - "units": "N*m", - "source": "ptdata:bmstinj", - "description": "Neutral beam injected torque, all sources.", - "min": -56.644382966354534, - "max": 129.9833380295058, - "mean": 2.2043209075927734, - "std": 2.11222505569458, - "pct": { - "0.1": -2.0636791725994676, - "1": -0.5384317586520496, - "5": -1.6338495756329507e-07, - "25": 0.4319133403840452, - "50": 1.963846077087278, - "75": 3.1821234334199193, - "95": 6.641525317445799, - "99": 8.941231792062355, - "99.9": 11.156712776956862 - } - }, - "ech_total": { - "units": "MW", - "source": "ptdata:ECHPWR", - "description": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "min": -19.31181996542309, - "max": 40.286455582885246, - "mean": 2.6981112957000732, - "std": 6.685519218444824, - "pct": { - "0.1": -1.0663586061709935, - "1": -0.09982622583332723, - "5": -0.020836448436920674, - "25": -3.2566890961760464e-08, - "50": -3.2566890961760464e-08, - "75": 1.1717011943616973, - "95": 21.558252060431304, - "99": 30.476182922859127, - "99.9": 37.09168917133024 - } - }, - "f1a": { - "units": "A", - "source": "ptdata:F1A", - "description": "Shaping F-coil F1A current (bank A).", - "min": -5776.925892871883, - "max": 5794.3504737288395, - "mean": -1382.3704833984375, - "std": 1349.629638671875, - "pct": { - "0.1": -4852.691808601986, - "1": -4131.456225748339, - "5": -3401.8604035239678, - "25": -2236.4754469921672, - "50": -1501.5458201268116, - "75": -660.4245966463927, - "95": 1294.4315819071094, - "99": 3103.250955923345, - "99.9": 4467.289606367005 - } - }, - "f2a": { - "units": "A", - "source": "ptdata:F2A", - "description": "Shaping F-coil F2A current (bank A).", - "min": -5716.347659616551, - "max": 5702.840977614059, - "mean": -1229.876708984375, - "std": 1248.3497314453125, - "pct": { - "0.1": -4093.397230708888, - "1": -3297.8668360449756, - "5": -2712.522533155646, - "25": -2004.455454331444, - "50": -1443.842241803098, - "75": -854.5004209979342, - "95": 1825.579117167513, - "99": 3097.0902901803724, - "99.9": 3899.548655232026 - } - }, - "f3a": { - "units": "A", - "source": "ptdata:F3A", - "description": "Shaping F-coil F3A current (bank A).", - "min": -5498.272347966228, - "max": 5321.719922394657, - "mean": -592.7352294921875, - "std": 1185.706298828125, - "pct": { - "0.1": -4140.690909683277, - "1": -3539.2136012211317, - "5": -2813.2888996278725, - "25": -1377.7435033975407, - "50": -152.16189816331342, - "75": 2.4453898354848604, - "95": 1203.107532773337, - "99": 2898.3184344684487, - "99.9": 3780.0556837479485 - } - }, - "f4a": { - "units": "A", - "source": "ptdata:F4A", - "description": "Shaping F-coil F4A current (bank A).", - "min": -5876.373800845117, - "max": 5855.700219305917, - "mean": 1098.1622314453125, - "std": 1368.95458984375, - "pct": { - "0.1": -4331.218505807293, - "1": -3344.4526378786877, - "5": -1858.4157962413597, - "25": 395.84891116184133, - "50": 1143.436262581068, - "75": 1990.2677717095535, - "95": 3141.5448401142426, - "99": 3756.430079500399, - "99.9": 4525.754910416766 - } - }, - "f5a": { - "units": "A", - "source": "ptdata:F5A", - "description": "Shaping F-coil F5A current (bank A).", - "min": -5178.8539079385355, - "max": 5353.141466672798, - "mean": 1173.57958984375, - "std": 1352.103759765625, - "pct": { - "0.1": -4592.7059148331355, - "1": -3597.7201189044818, - "5": -1551.4942446467403, - "25": 543.836095032849, - "50": 1273.969119983141, - "75": 2051.0443148459794, - "95": 3019.669622905384, - "99": 3875.454685744494, - "99.9": 4738.506855960392 - } - }, - "f6a": { - "units": "A", - "source": "ptdata:F6A", - "description": "Shaping F-coil F6A current (bank A).", - "min": -7929.903731492232, - "max": 5741.056818467809, - "mean": -2493.411865234375, - "std": 1867.8076171875, - "pct": { - "0.1": -6125.90268588119, - "1": -4963.398523516425, - "5": -4319.477588996284, - "25": -3574.8234234024885, - "50": -2898.635802832382, - "75": -2143.0930801744807, - "95": 2999.75903843203, - "99": 4137.6543157735705, - "99.9": 4783.375582166487 - } - }, - "f7a": { - "units": "A", - "source": "ptdata:F7A", - "description": "Shaping F-coil F7A current (bank A).", - "min": -9825.736080045011, - "max": 8678.484606762057, - "mean": -2367.570556640625, - "std": 1999.19970703125, - "pct": { - "0.1": -7676.219824168618, - "1": -6127.379912259545, - "5": -4909.893927511103, - "25": -3430.1309476786882, - "50": -2697.460342263373, - "75": -1913.0579478721388, - "95": 2723.164038733837, - "99": 3948.221013655396, - "99.9": 5316.086800760559 - } - }, - "f8a": { - "units": "A", - "source": "ptdata:F8A", - "description": "Shaping F-coil F8A current (bank A).", - "min": -5378.835169240788, - "max": 5880.767402237174, - "mean": 996.0214233398438, - "std": 1498.948974609375, - "pct": { - "0.1": -4229.744640827867, - "1": -3363.368412210415, - "5": -1922.2114690963926, - "25": 60.761390529545906, - "50": 1153.9241798399726, - "75": 1951.1572686642544, - "95": 3318.078493605748, - "99": 3973.7764489149104, - "99.9": 4670.296725684707 - } - }, - "f9a": { - "units": "A", - "source": "ptdata:F9A", - "description": "Shaping F-coil F9A current (bank A).", - "min": -7206.032812499594, - "max": 8700.684616308497, - "mean": -535.8018798828125, - "std": 1258.01171875, - "pct": { - "0.1": -4739.927394914494, - "1": -3344.557163847978, - "5": -2567.420669960383, - "25": -1538.6304412830955, - "50": -578.9736547563273, - "75": 353.08467764596537, - "95": 1558.2607279613098, - "99": 2657.691791383836, - "99.9": 4334.930796170508 - } - }, - "f1b": { - "units": "A", - "source": "ptdata:F1B", - "description": "Shaping F-coil F1B current (bank B).", - "min": -5921.943154546981, - "max": 5407.326196618229, - "mean": -1373.1888427734375, - "std": 1367.82275390625, - "pct": { - "0.1": -5179.567735964654, - "1": -4339.478258925401, - "5": -3463.431883510691, - "25": -2205.922070942479, - "50": -1459.5306304510002, - "75": -750.1948036110768, - "95": 1428.796834935177, - "99": 3233.0438718527407, - "99.9": 4240.724502122051 - } - }, - "f2b": { - "units": "A", - "source": "ptdata:F2B", - "description": "Shaping F-coil F2B current (bank B).", - "min": -5788.286812358208, - "max": 5428.562849130928, - "mean": -1218.50048828125, - "std": 1316.67724609375, - "pct": { - "0.1": -4785.998935671587, - "1": -3520.521383204173, - "5": -2855.1671089762676, - "25": -1969.483606794242, - "50": -1447.1879016413761, - "75": -866.6265611311096, - "95": 2049.217650390811, - "99": 3312.4349928765846, - "99.9": 4011.5142868858347 - } - }, - "f3b": { - "units": "A", - "source": "ptdata:F3B", - "description": "Shaping F-coil F3B current (bank B).", - "min": -5503.943071765381, - "max": 4849.177948074737, - "mean": -1005.3848266601562, - "std": 1308.8258056640625, - "pct": { - "0.1": -4452.6277480541985, - "1": -3641.634707712471, - "5": -2937.4861003450947, - "25": -1881.7475544966392, - "50": -1170.6945714968547, - "75": -124.13671681902403, - "95": 1683.5400540223286, - "99": 3015.8060365193123, - "99.9": 3797.6599244161957 - } - }, - "f4b": { - "units": "A", - "source": "ptdata:F4B", - "description": "Shaping F-coil F4B current (bank B).", - "min": -5829.242194941551, - "max": 5787.149431930685, - "mean": 1124.2967529296875, - "std": 1519.5994873046875, - "pct": { - "0.1": -4083.976449898858, - "1": -3247.08251902718, - "5": -2270.942268479742, - "25": 376.8608226937906, - "50": 1392.450441038166, - "75": 2146.7001303629104, - "95": 3145.5476189867913, - "99": 3926.614817946318, - "99.9": 4582.551950710075 - } - }, - "f5b": { - "units": "A", - "source": "ptdata:F5B", - "description": "Shaping F-coil F5B current (bank B).", - "min": -5213.110339059254, - "max": 5388.213772287713, - "mean": 1443.536865234375, - "std": 1408.3306884765625, - "pct": { - "0.1": -4134.61747806435, - "1": -3056.873937432705, - "5": -1361.0988601293998, - "25": 675.1515533174199, - "50": 1572.802070225599, - "75": 2367.5452263604984, - "95": 3528.863240540377, - "99": 4411.454242162536, - "99.9": 4967.30642206674 - } - }, - "f6b": { - "units": "A", - "source": "ptdata:F6B", - "description": "Shaping F-coil F6B current (bank B).", - "min": -7604.653108484432, - "max": 7763.1261416792295, - "mean": -2463.248046875, - "std": 1836.4208984375, - "pct": { - "0.1": -6372.627428710043, - "1": -5251.4106280007745, - "5": -4318.157196234368, - "25": -3524.5849152058445, - "50": -2837.2759930056304, - "75": -2089.94465303326, - "95": 2871.6849973390945, - "99": 3948.010461650111, - "99.9": 4803.251616324593 - } - }, - "f7b": { - "units": "A", - "source": "ptdata:F7B", - "description": "Shaping F-coil F7B current (bank B).", - "min": -11380.254539563213, - "max": 9414.242772782009, - "mean": -2941.56005859375, - "std": 2510.1083984375, - "pct": { - "0.1": -9236.286164628174, - "1": -7962.01372128499, - "5": -6618.689743738845, - "25": -4397.68407591947, - "50": -3041.7944101983817, - "75": -2113.0768216001165, - "95": 2850.240503964187, - "99": 5238.131223534479, - "99.9": 6771.41582857779 - } - }, - "f8b": { - "units": "A", - "source": "ptdata:F8B", - "description": "Shaping F-coil F8B current (bank B).", - "min": -5834.457886045129, - "max": 5952.292180058913, - "mean": 1431.05615234375, - "std": 1718.2965087890625, - "pct": { - "0.1": -4377.886849186064, - "1": -3547.8568327724756, - "5": -2536.325388000092, - "25": 592.1441487378677, - "50": 1743.1741236182588, - "75": 2613.9050347435855, - "95": 3655.019608301406, - "99": 4295.252919476556, - "99.9": 5183.621783504976 - } - }, - "f9b": { - "units": "A", - "source": "ptdata:F9B", - "description": "Shaping F-coil F9B current (bank B).", - "min": -7298.33418485197, - "max": 8673.475372842513, - "mean": -214.02586364746094, - "std": 1388.83447265625, - "pct": { - "0.1": -4443.002941036773, - "1": -3335.961239603393, - "5": -2530.3434455144015, - "25": -1111.6205754278508, - "50": -212.41719832099042, - "75": 564.1401009862525, - "95": 2296.158459733251, - "99": 3401.023805016151, - "99.9": 4981.695296538042 - } - }, - "ecoila": { - "units": "A", - "source": "ptdata:ECOILA", - "description": "Ohmic E-coil bank A current.", - "min": -68526.67779690563, - "max": 65669.33446503483, - "mean": -6965.32666015625, - "std": 18940.9453125, - "pct": { - "0.1": -62521.0592220894, - "1": -53449.0677376177, - "5": -39610.65329064206, - "25": -19599.348704727538, - "50": -6887.604056684089, - "75": 6065.040591650557, - "95": 23926.96154448237, - "99": 33650.27142286909, - "99.9": 48164.54971213867 - } - }, - "ecoilb": { - "units": "A", - "source": "ptdata:ECOILB", - "description": "Ohmic E-coil bank B current.", - "min": -67880.78461590248, - "max": 67380.80764904841, - "mean": -6876.16455078125, - "std": 18723.662109375, - "pct": { - "0.1": -61839.528701402356, - "1": -52787.079189397904, - "5": -39153.2527665565, - "25": -19383.82435886666, - "50": -6768.996463787789, - "75": 6013.297288247475, - "95": 23686.641557508636, - "99": 33187.653018934754, - "99.9": 47362.43837391052 - } - }, - "gasa_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "description": "Calibrated gas injection flow, valve A.", - "min": -0.9805486760911233, - "max": 348.1779045740827, - "mean": 15.054444313049316, - "std": 26.369497299194336, - "pct": { - "0.1": -0.0181447514768128, - "1": 0.0006228885411054819, - "5": 0.0014589414841879034, - "25": 0.00852798057103854, - "50": 0.09974314587981326, - "75": 19.645558552678416, - "95": 71.02669389337856, - "99": 137.36341388263276, - "99.9": 211.79616738152396 - } - }, - "gasb_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "description": "Calibrated gas injection flow, valve B.", - "min": -0.5231055139632899, - "max": 317.69717326145866, - "mean": 1.386172890663147, - "std": 3.4090511798858643, - "pct": { - "0.1": 9.14047308575583e-06, - "1": 0.0007714573310613204, - "5": 0.002068321612864521, - "25": 0.009055124211873267, - "50": 0.07339015461169385, - "75": 1.9421402622606716, - "95": 1.9421402622606716, - "99": 23.663863921838843, - "99.9": 149.40068998150738 - } - }, - "gasc_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "description": "Calibrated gas injection flow, valve C.", - "min": -0.3965804467767108, - "max": 306.0269668007428, - "mean": 0.35034820437431335, - "std": 0.4470684826374054, - "pct": { - "0.1": 7.428448363699935e-05, - "1": 0.00026770734685732656, - "5": 0.0006667805693404416, - "25": 0.002788385500787083, - "50": 0.023577950502740697, - "75": 0.7508911827356307, - "95": 0.7508911827356307, - "99": 2.733332630282, - "99.9": 108.67323889612304 - } - }, - "gasd_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "description": "Calibrated gas injection flow, valve D.", - "min": -0.5287260135880842, - "max": 771.5043798529183, - "mean": 0.528103232383728, - "std": 0.654624342918396, - "pct": { - "0.1": 5.497087182604332e-05, - "1": 0.000175335120693898, - "5": 0.0005482846440516553, - "25": 0.003719433481388368, - "50": 0.08385269566973214, - "75": 1.0383906373403984, - "95": 1.0383906373403984, - "99": 4.359676988215197, - "99.9": 127.54440071212512 - } - }, - "gase_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "description": "Calibrated gas injection flow, valve E.", - "min": -0.2211384331710633, - "max": 672.8582070151267, - "mean": 0.27696067094802856, - "std": 0.17616958916187286, - "pct": { - "0.1": 0.00010156410138473793, - "1": 0.000223585566083373, - "5": 0.0005190716405260032, - "25": 0.011627604901727706, - "50": 0.3920832239686922, - "75": 0.3920832239686922, - "95": 0.3920832239686922, - "99": 0.3920832239686922, - "99.9": 29.75536079519976 - } - }, - "bt": { - "units": "T", - "source": "ptdata:bt", - "description": "Vacuum toroidal magnetic field (signed).", - "min": -2.2353815075115375, - "max": 2.25186423641397, - "mean": -0.971906840801239, - "std": 1.6484158039093018, - "pct": { - "0.1": -2.2151064134142304, - "1": -2.1819873443702726, - "5": -2.136304350652244, - "25": -2.0446028795017246, - "50": -1.8984274308309796, - "75": -1.0260122281948352, - "95": 2.053318112027725, - "99": 2.10945640328767, - "99.9": 2.1819705410137904 - } - } - } -} diff --git a/s0/fuse29_seq.onnx b/s0/fuse29_seq.onnx deleted file mode 100644 index f1d1901f52816fdc8e4d60269353b2c6e5ffd493..0000000000000000000000000000000000000000 --- a/s0/fuse29_seq.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0274ad98cc51ee938422f3c9febd3c3cf3141a35d39ff2a62efeb75f9ce43577 -size 45464382 diff --git a/s0/fuse29_step.onnx b/s0/fuse29_step.onnx deleted file mode 100644 index 1200f8963532a686db07d5ef2539054cc5bf188b..0000000000000000000000000000000000000000 --- a/s0/fuse29_step.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9150698ab06af368eec857ea429191bf8a0593e9fd9d7e571bb7ce5bcbcf853a -size 45081271 diff --git a/s0/model_config.json b/s0/model_config.json deleted file mode 100644 index a44d0231afbbe05d465efb21b6c04f423b707b04..0000000000000000000000000000000000000000 --- a/s0/model_config.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "schema_version": 1, - "model": "fuse29", - "seed": 0, - "description": "29-input Mamba-2 pedestal predictor for DIII-D. Strictly causal, 20 Hz, nine heads at rho_tor = 0.85.", - "architecture": { - "family": "Mamba-2 (structured state-space duality)", - "d_model": 512, - "n_layers": 6, - "d_state": 128, - "d_conv": 4, - "expand": 2, - "headdim": 128, - "nheads": 8, - "ngroups": 2, - "chunk_size": 100, - "d_inner": 1024, - "conv_dim": 1536, - "n_params": 11254425 - }, - "cadence": { - "hz": 20, - "period_ms": 50.0, - "rho_tor": 0.85 - }, - "inputs": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "n": 29, - "units": { - "pinj": "MW", - "tinj": "N*m", - "ech_total": "MW", - "f1a": "A", - "f2a": "A", - "f3a": "A", - "f4a": "A", - "f5a": "A", - "f6a": "A", - "f7a": "A", - "f8a": "A", - "f9a": "A", - "f1b": "A", - "f2b": "A", - "f3b": "A", - "f4b": "A", - "f5b": "A", - "f6b": "A", - "f7b": "A", - "f8b": "A", - "f9b": "A", - "ecoila": "A", - "ecoilb": "A", - "gasa_cal": "Torr*L/s", - "gasb_cal": "Torr*L/s", - "gasc_cal": "Torr*L/s", - "gasd_cal": "Torr*L/s", - "gase_cal": "Torr*L/s", - "bt": "T" - }, - "sources": { - "pinj": "ptdata:bmspinj", - "tinj": "ptdata:bmstinj", - "ech_total": "ptdata:ECHPWR", - "f1a": "ptdata:F1A", - "f2a": "ptdata:F2A", - "f3a": "ptdata:F3A", - "f4a": "ptdata:F4A", - "f5a": "ptdata:F5A", - "f6a": "ptdata:F6A", - "f7a": "ptdata:F7A", - "f8a": "ptdata:F8A", - "f9a": "ptdata:F9A", - "f1b": "ptdata:F1B", - "f2b": "ptdata:F2B", - "f3b": "ptdata:F3B", - "f4b": "ptdata:F4B", - "f5b": "ptdata:F5B", - "f6b": "ptdata:F6B", - "f7b": "ptdata:F7B", - "f8b": "ptdata:F8B", - "f9b": "ptdata:F9B", - "ecoila": "ptdata:ECOILA", - "ecoilb": "ptdata:ECOILB", - "gasa_cal": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "gasb_cal": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "gasc_cal": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "gasd_cal": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "gase_cal": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "bt": "ptdata:bt" - }, - "descriptions": { - "pinj": "Neutral beam injected power, all sources.", - "tinj": "Neutral beam injected torque, all sources.", - "ech_total": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "f1a": "Shaping F-coil F1A current (bank A).", - "f2a": "Shaping F-coil F2A current (bank A).", - "f3a": "Shaping F-coil F3A current (bank A).", - "f4a": "Shaping F-coil F4A current (bank A).", - "f5a": "Shaping F-coil F5A current (bank A).", - "f6a": "Shaping F-coil F6A current (bank A).", - "f7a": "Shaping F-coil F7A current (bank A).", - "f8a": "Shaping F-coil F8A current (bank A).", - "f9a": "Shaping F-coil F9A current (bank A).", - "f1b": "Shaping F-coil F1B current (bank B).", - "f2b": "Shaping F-coil F2B current (bank B).", - "f3b": "Shaping F-coil F3B current (bank B).", - "f4b": "Shaping F-coil F4B current (bank B).", - "f5b": "Shaping F-coil F5B current (bank B).", - "f6b": "Shaping F-coil F6B current (bank B).", - "f7b": "Shaping F-coil F7B current (bank B).", - "f8b": "Shaping F-coil F8B current (bank B).", - "f9b": "Shaping F-coil F9B current (bank B).", - "ecoila": "Ohmic E-coil bank A current.", - "ecoilb": "Ohmic E-coil bank B current.", - "gasa_cal": "Calibrated gas injection flow, valve A.", - "gasb_cal": "Calibrated gas injection flow, valve B.", - "gasc_cal": "Calibrated gas injection flow, valve C.", - "gasd_cal": "Calibrated gas injection flow, valve D.", - "gase_cal": "Calibrated gas injection flow, valve E.", - "bt": "Vacuum toroidal magnetic field (signed)." - }, - "space": "raw physical units; the graph applies the z-score", - "note": "Check your units against actuator_ranges.json before trusting any output. A unit error produces confident nonsense rather than an exception." - }, - "outputs": { - "names": [ - "ne", - "te_ped", - "ti_ped", - "t_rot_ped", - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc", - "hmode" - ], - "n": 9, - "units": { - "ne": "1e19 m^-3", - "te_ped": "keV", - "ti_ped": "keV", - "t_rot_ped": "krad/s", - "neped_prmtan": "1e19 m^-3", - "teped_prmtan": "keV", - "rho_sym": "rho_tor (dimensionless)", - "ne_top_loc": "rho_tor (dimensionless)", - "hmode": "probability in [0, 1]" - }, - "note": "Physical units. hmode is a probability in [0, 1]; the graph applies the sigmoid.", - "hmode_gated": { - "heads": [ - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc" - ], - "indices": [ - 4, - 5, - 6, - 7 - ], - "threshold": 0.5, - "note": "These four heads were trained only on H-mode rows and are undefined otherwise. The graph does NOT gate them; the consumer must, using the model's own hmode output. See docs/GATING.md." - } - }, - "graphs": { - "fuse29_step.onnx": { - "purpose": "real-time, one 50 ms tick per call", - "inputs": { - "actuators": [ - "batch", - 29 - ], - "conv_state": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "outputs": { - "predictions": [ - "batch", - 9 - ], - "conv_state_out": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state_out": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "initial_state": "all zeros at the start of a shot", - "max_shot_length": "unbounded" - }, - "fuse29_seq.onnx": { - "purpose": "offline scoring of a whole shot", - "inputs": { - "actuators": [ - "batch", - 256, - 29 - ] - }, - "outputs": { - "predictions": [ - "batch", - 256, - 9 - ] - }, - "seq_len": 256, - "note": "Sequence length is FIXED. Right-pad shorter shots with zeros and read the first T outputs; the model is strictly causal so this is exact. For longer shots use the step graph or re-export with --seq-len." - } - }, - "dtype": "float32", - "onnx_opset": 17, - "training": { - "epoch": 19, - "val_loss": 1.1169083155691624, - "note": "See docs/TRAINING.md for the full recipe." - } -} diff --git a/s0/norms.json b/s0/norms.json deleted file mode 100644 index 98c8c06209fd050ed78c21fa5b30afd95a71c171..0000000000000000000000000000000000000000 --- a/s0/norms.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "schema_version": 2, - "note": "Statistics are baked into the shipped ONNX graphs. This file is for inspection and for reproducing the transform outside the graph; it is not required at inference time.", - "actuator_space": "physical", - "std_floor": 1e-06, - "clip_sigma": 20.0, - "provenance": { - "split": "train", - "n_shots": 32731, - "rho_index": 85, - "source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85, random stratified split (split_index.json)", - "note": "Recomputed on the NEW random train split. The source shards carried z-scores from the OLD chronological train split, whose shots overlap our test set. Actuator statistics are winsorised so a corrupted sample cannot set a channel's divisor.", - "inflated_channels": [ - "pinj", - "gasc_cal", - "gasd_cal", - "gase_cal" - ], - "actuator_estimator": "winsorised to p1..p99", - "actuator_space": "physical", - "composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "composition": "z = (x_phys - (m1 + s1*m2)) / (s1*s2), where (m1, s1) is the upstream FPE z-score and (m2, s2) is this model's re-scale onto its own training split" - }, - "actuators": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "mean": [ - 3.838883638381958, - 2.2043209075927734, - 2.6981112957000732, - -1382.3704833984375, - -1229.876708984375, - -592.7352294921875, - 1098.1622314453125, - 1173.57958984375, - -2493.411865234375, - -2367.570556640625, - 996.0214233398438, - -535.8018798828125, - -1373.1888427734375, - -1218.50048828125, - -1005.3848266601562, - 1124.2967529296875, - 1443.536865234375, - -2463.248046875, - -2941.56005859375, - 1431.05615234375, - -214.02586364746094, - -6965.32666015625, - -6876.16455078125, - 15.054444313049316, - 1.386172890663147, - 0.35034820437431335, - 0.528103232383728, - 0.27696067094802856, - -0.971906840801239 - ], - "std": [ - 3.0613932609558105, - 2.11222505569458, - 6.685519218444824, - 1349.629638671875, - 1248.3497314453125, - 1185.706298828125, - 1368.95458984375, - 1352.103759765625, - 1867.8076171875, - 1999.19970703125, - 1498.948974609375, - 1258.01171875, - 1367.82275390625, - 1316.67724609375, - 1308.8258056640625, - 1519.5994873046875, - 1408.3306884765625, - 1836.4208984375, - 2510.1083984375, - 1718.2965087890625, - 1388.83447265625, - 18940.9453125, - 18723.662109375, - 26.369497299194336, - 3.4090511798858643, - 0.4470684826374054, - 0.654624342918396, - 0.17616958916187286, - 1.6484158039093018 - ], - "transform": "z = clip((x - mean) / std, -clip_sigma, +clip_sigma), applied inside the graph" - }, - "targets": { - "ne": { - "mean": 2.7511744499206543, - "std": 1.654153823852539 - }, - "te_ped": { - "mean": 0.5915626287460327, - "std": 0.43467429280281067 - }, - "ti_ped": { - "mean": 1.016850233078003, - "std": 0.681096076965332 - }, - "t_rot_ped": { - "mean": 21.244613647460938, - "std": 16.59148406982422 - }, - "neped_prmtan": { - "mean": 2.7231285572052, - "std": 1.7005536556243896 - }, - "teped_prmtan": { - "mean": 0.46375223994255066, - "std": 0.36919456720352173 - }, - "rho_sym": { - "mean": 0.9757616519927979, - "std": 0.04329206794500351 - }, - "ne_top_loc": { - "mean": 0.9261865019798279, - "std": 0.049897171556949615 - } - }, - "hmode": { - "transform": "sigmoid", - "note": "hmode is a logit in the trunk; the graph applies the sigmoid." - }, - "stages": { - "note": "The composed actuator statistics above are the product of these two. Shown for traceability; use the composed values.", - "stage1_physical_to_fpe_zscore": { - "mean": [ - 2.8111997039100878, - 2.154143940948575, - 2.159654935239209, - -1444.0438445123289, - -1315.1185221229061, - -639.741760304047, - 1172.4978680515835, - 1222.4970107268077, - -2488.8410961768263, - -2491.3739557685253, - 1050.107386405324, - -578.9736547563273, - -1421.0817159358041, - -1285.3967398730092, - -1061.0290851406676, - 1186.4795970820587, - 1460.6822372728345, - -2452.093120847959, - -3071.3132492215186, - 1531.3304960724108, - -262.6728625067526, - -6887.604056684089, - -6768.996463787789, - 14.89178144369171, - 1.9421402622606716, - 0.7508911827356307, - 1.0383906373403984, - 0.3920832239686922, - -1.0310375752078498 - ], - "std": [ - 194.08418888726106, - 2.3684465859740262, - 5.948083564785035, - 1267.4907621702682, - 1217.4478106828162, - 1249.3915272640536, - 1345.3871181128568, - 1359.1934832307923, - 1887.1891497052302, - 1888.1014577442652, - 1559.9875106371376, - 1287.2118470203372, - 1271.813282654729, - 1259.8644805335082, - 1361.9306367877398, - 1521.172083160852, - 1393.2120473032558, - 1856.723912629122, - 2432.8530409799628, - 1705.6959050005082, - 1421.8036451037203, - 19092.148992270486, - 18858.28389193975, - 27.289184462156058, - 11.092415079529571, - 9.017289768908354, - 12.055982101097918, - 6.498888909025979, - 1.599000778986496 - ] - }, - "stage2_fpe_zscore_to_model": { - "mean": [ - 0.0052950419485569, - 0.02118559367954731, - 0.0905260294675827, - 0.04865782707929611, - 0.0700167864561081, - 0.03762352466583252, - -0.05525219440460205, - -0.03599006310105324, - -0.002421961398795247, - 0.06557027250528336, - -0.03467077016830444, - 0.03353898227214813, - 0.03765711933374405, - 0.05309795215725899, - 0.040856875479221344, - -0.04087827727198601, - -0.012306398712098598, - -0.006007813848555088, - 0.05333370715379715, - -0.05878793075680733, - 0.03421499580144882, - -0.004070908762514591, - -0.00568280229344964, - 0.005960696842521429, - -0.050121404230594635, - -0.04441944137215614, - -0.042326491326093674, - -0.017714189365506172, - 0.036979787051677704 - ], - "std": [ - 0.015773532912135124, - 0.8918187022209167, - 1.1239787340164185, - 1.0648043155670166, - 1.0253825187683105, - 0.9490270018577576, - 1.0175172090530396, - 0.994783878326416, - 0.9897299408912659, - 1.0588412284851074, - 0.9608724117279053, - 0.9773152470588684, - 1.0754902362823486, - 1.04509437084198, - 0.9610077142715454, - 0.9989661574363708, - 1.0108516216278076, - 0.9890651702880859, - 1.0317550897598267, - 1.007387399673462, - 0.9768117070198059, - 0.9920803308486938, - 0.9928614497184753, - 0.9662984609603882, - 0.30733174085617065, - 0.04957903176546097, - 0.05429871752858162, - 0.02710764855146408, - 1.030903697013855 - ] - } - } -} diff --git a/s0/provenance.json b/s0/provenance.json deleted file mode 100644 index 1dd5b8fed3e962f06ce33ca13d390154d7e0803c..0000000000000000000000000000000000000000 --- a/s0/provenance.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "schema_version": 1, - "exported_utc": "2026-09-03T00:46:21.979021+00:00", - "seed": 0, - "source_checkpoint": "/flare/fusiondl_aesp/fuse_bd_model/fuse20/runs/fuse29r_s0/best_model.pt", - "source_checkpoint_sha256": "875ff7248c0bfde39c54e75d4638bd563f8f78b52dc26e294cdd308b116d13c7", - "norms_source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json", - "norms_actuator_space": "physical", - "norms_composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "onnx_opset": 17, - "exporter": "torch.onnx.export (TorchScript, dynamo=False)", - "versions": { - "torch": "2.10.0a0+git449b176", - "python": "3.12.12", - "platform": "Linux-5.14.21-150400.24.235-default-x86_64-with-glibc2.31", - "onnx": "1.22.0", - "onnxruntime": "1.29.0" - }, - "artifacts": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "9150698ab06af368eec857ea429191bf8a0593e9fd9d7e571bb7ce5bcbcf853a" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "0274ad98cc51ee938422f3c9febd3c3cf3141a35d39ff2a62efeb75f9ce43577" - } - } -} diff --git a/s1/README.md b/s1/README.md deleted file mode 100644 index 1b5251b716f95e4ad90c53af34e0db4032e369c7..0000000000000000000000000000000000000000 --- a/s1/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -license: mit -library_name: onnx -tags: - - onnx - - fusion - - plasma-physics - - tokamak - - diii-d - - mamba ---- - -# fuse29 — seed 1 - -This is seed 1, one of eight independently trained runs. Seed 0 is the champion and the default; this one exists so you can measure spread across training runs. Unless you are doing that, you want seed 0. - -29-input Mamba-2 pedestal predictor for DIII-D. Raw physical units in, -physical units out. See the [root model card](https://huggingface.co/SCS-Lab/FUSE29-Pedestal-model) -for the full description, I/O contract, accuracy and limitations. - -| | | -|---|---| -| Seed | 1 | -| Parameters | 11,254,425 | -| Best validation loss | 1.1129 | -| Sequence graph length | 256 ticks | -| ONNX opset | 17 | -| Exported | 2026-09-03T00:46:24.670692+00:00 | -| Source checkpoint SHA-256 | `a77e8a7359c47e1f…` | - -## Load - -```python -from fuse29.runtime import Fuse29Predictor - -predictor = Fuse29Predictor.from_pretrained("SCS-Lab/FUSE29-Pedestal-model", seed=1) -``` - -## Files - -| File | | -|---|---| -| `fuse29_step.onnx` | one 50 ms tick, carries state, no length limit | -| `fuse29_seq.onnx` | whole shot at a fixed 256 ticks | -| `model_config.json` | I/O contract: names, order, units, sources, shapes | -| `norms.json` | the statistics baked into the graphs | -| `actuator_ranges.json` | training-split distribution, for checking your units | -| `provenance.json` | source checkpoint hash, library versions, artefact hashes | - -## Before you use it - -- Four heads (`neped_prmtan`, `teped_prmtan`, `rho_sym`, `ne_top_loc`) are - **only valid in H-mode** and the graph does not gate them. Gate on the - model's own `hmode` output. -- `pinj` is in **MW**, not W. Run `predictor.check_units(shot)` once. -- Output column order is not alphabetical. See `model_config.json`. diff --git a/s1/actuator_ranges.json b/s1/actuator_ranges.json deleted file mode 100644 index 08d19f4e80f49e6bbd18c40674b06946a02cc61a..0000000000000000000000000000000000000000 --- a/s1/actuator_ranges.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "schema_version": 1, - "note": "Physical-units distribution of each actuator over the training split. Use it to check that your signals are in the units the graph expects; a unit error is the one preprocessing mistake that produces confident nonsense rather than an exception.", - "split": "train", - "n_shots": 32731, - "n_ticks": 3020926, - "percentiles": [ - 0.1, - 1, - 5, - 25, - 50, - 75, - 95, - 99, - 99.9 - ], - "channels": { - "pinj": { - "units": "MW", - "source": "ptdata:bmspinj", - "description": "Neutral beam injected power, all sources.", - "min": -46005.02701919088, - "max": 17.512712760455507, - "mean": 3.838883638381958, - "std": 3.0613932609558105, - "pct": { - "0.1": -0.004132416388869853, - "1": 4.112187479421436e-09, - "5": 4.112187479421436e-09, - "25": 1.311169336894574, - "50": 3.18466408866965, - "75": 5.748764762873332, - "95": 9.841882532311711, - "99": 12.212702351352696, - "99.9": 14.791924355083399 - } - }, - "tinj": { - "units": "N*m", - "source": "ptdata:bmstinj", - "description": "Neutral beam injected torque, all sources.", - "min": -56.644382966354534, - "max": 129.9833380295058, - "mean": 2.2043209075927734, - "std": 2.11222505569458, - "pct": { - "0.1": -2.0636791725994676, - "1": -0.5384317586520496, - "5": -1.6338495756329507e-07, - "25": 0.4319133403840452, - "50": 1.963846077087278, - "75": 3.1821234334199193, - "95": 6.641525317445799, - "99": 8.941231792062355, - "99.9": 11.156712776956862 - } - }, - "ech_total": { - "units": "MW", - "source": "ptdata:ECHPWR", - "description": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "min": -19.31181996542309, - "max": 40.286455582885246, - "mean": 2.6981112957000732, - "std": 6.685519218444824, - "pct": { - "0.1": -1.0663586061709935, - "1": -0.09982622583332723, - "5": -0.020836448436920674, - "25": -3.2566890961760464e-08, - "50": -3.2566890961760464e-08, - "75": 1.1717011943616973, - "95": 21.558252060431304, - "99": 30.476182922859127, - "99.9": 37.09168917133024 - } - }, - "f1a": { - "units": "A", - "source": "ptdata:F1A", - "description": "Shaping F-coil F1A current (bank A).", - "min": -5776.925892871883, - "max": 5794.3504737288395, - "mean": -1382.3704833984375, - "std": 1349.629638671875, - "pct": { - "0.1": -4852.691808601986, - "1": -4131.456225748339, - "5": -3401.8604035239678, - "25": -2236.4754469921672, - "50": -1501.5458201268116, - "75": -660.4245966463927, - "95": 1294.4315819071094, - "99": 3103.250955923345, - "99.9": 4467.289606367005 - } - }, - "f2a": { - "units": "A", - "source": "ptdata:F2A", - "description": "Shaping F-coil F2A current (bank A).", - "min": -5716.347659616551, - "max": 5702.840977614059, - "mean": -1229.876708984375, - "std": 1248.3497314453125, - "pct": { - "0.1": -4093.397230708888, - "1": -3297.8668360449756, - "5": -2712.522533155646, - "25": -2004.455454331444, - "50": -1443.842241803098, - "75": -854.5004209979342, - "95": 1825.579117167513, - "99": 3097.0902901803724, - "99.9": 3899.548655232026 - } - }, - "f3a": { - "units": "A", - "source": "ptdata:F3A", - "description": "Shaping F-coil F3A current (bank A).", - "min": -5498.272347966228, - "max": 5321.719922394657, - "mean": -592.7352294921875, - "std": 1185.706298828125, - "pct": { - "0.1": -4140.690909683277, - "1": -3539.2136012211317, - "5": -2813.2888996278725, - "25": -1377.7435033975407, - "50": -152.16189816331342, - "75": 2.4453898354848604, - "95": 1203.107532773337, - "99": 2898.3184344684487, - "99.9": 3780.0556837479485 - } - }, - "f4a": { - "units": "A", - "source": "ptdata:F4A", - "description": "Shaping F-coil F4A current (bank A).", - "min": -5876.373800845117, - "max": 5855.700219305917, - "mean": 1098.1622314453125, - "std": 1368.95458984375, - "pct": { - "0.1": -4331.218505807293, - "1": -3344.4526378786877, - "5": -1858.4157962413597, - "25": 395.84891116184133, - "50": 1143.436262581068, - "75": 1990.2677717095535, - "95": 3141.5448401142426, - "99": 3756.430079500399, - "99.9": 4525.754910416766 - } - }, - "f5a": { - "units": "A", - "source": "ptdata:F5A", - "description": "Shaping F-coil F5A current (bank A).", - "min": -5178.8539079385355, - "max": 5353.141466672798, - "mean": 1173.57958984375, - "std": 1352.103759765625, - "pct": { - "0.1": -4592.7059148331355, - "1": -3597.7201189044818, - "5": -1551.4942446467403, - "25": 543.836095032849, - "50": 1273.969119983141, - "75": 2051.0443148459794, - "95": 3019.669622905384, - "99": 3875.454685744494, - "99.9": 4738.506855960392 - } - }, - "f6a": { - "units": "A", - "source": "ptdata:F6A", - "description": "Shaping F-coil F6A current (bank A).", - "min": -7929.903731492232, - "max": 5741.056818467809, - "mean": -2493.411865234375, - "std": 1867.8076171875, - "pct": { - "0.1": -6125.90268588119, - "1": -4963.398523516425, - "5": -4319.477588996284, - "25": -3574.8234234024885, - "50": -2898.635802832382, - "75": -2143.0930801744807, - "95": 2999.75903843203, - "99": 4137.6543157735705, - "99.9": 4783.375582166487 - } - }, - "f7a": { - "units": "A", - "source": "ptdata:F7A", - "description": "Shaping F-coil F7A current (bank A).", - "min": -9825.736080045011, - "max": 8678.484606762057, - "mean": -2367.570556640625, - "std": 1999.19970703125, - "pct": { - "0.1": -7676.219824168618, - "1": -6127.379912259545, - "5": -4909.893927511103, - "25": -3430.1309476786882, - "50": -2697.460342263373, - "75": -1913.0579478721388, - "95": 2723.164038733837, - "99": 3948.221013655396, - "99.9": 5316.086800760559 - } - }, - "f8a": { - "units": "A", - "source": "ptdata:F8A", - "description": "Shaping F-coil F8A current (bank A).", - "min": -5378.835169240788, - "max": 5880.767402237174, - "mean": 996.0214233398438, - "std": 1498.948974609375, - "pct": { - "0.1": -4229.744640827867, - "1": -3363.368412210415, - "5": -1922.2114690963926, - "25": 60.761390529545906, - "50": 1153.9241798399726, - "75": 1951.1572686642544, - "95": 3318.078493605748, - "99": 3973.7764489149104, - "99.9": 4670.296725684707 - } - }, - "f9a": { - "units": "A", - "source": "ptdata:F9A", - "description": "Shaping F-coil F9A current (bank A).", - "min": -7206.032812499594, - "max": 8700.684616308497, - "mean": -535.8018798828125, - "std": 1258.01171875, - "pct": { - "0.1": -4739.927394914494, - "1": -3344.557163847978, - "5": -2567.420669960383, - "25": -1538.6304412830955, - "50": -578.9736547563273, - "75": 353.08467764596537, - "95": 1558.2607279613098, - "99": 2657.691791383836, - "99.9": 4334.930796170508 - } - }, - "f1b": { - "units": "A", - "source": "ptdata:F1B", - "description": "Shaping F-coil F1B current (bank B).", - "min": -5921.943154546981, - "max": 5407.326196618229, - "mean": -1373.1888427734375, - "std": 1367.82275390625, - "pct": { - "0.1": -5179.567735964654, - "1": -4339.478258925401, - "5": -3463.431883510691, - "25": -2205.922070942479, - "50": -1459.5306304510002, - "75": -750.1948036110768, - "95": 1428.796834935177, - "99": 3233.0438718527407, - "99.9": 4240.724502122051 - } - }, - "f2b": { - "units": "A", - "source": "ptdata:F2B", - "description": "Shaping F-coil F2B current (bank B).", - "min": -5788.286812358208, - "max": 5428.562849130928, - "mean": -1218.50048828125, - "std": 1316.67724609375, - "pct": { - "0.1": -4785.998935671587, - "1": -3520.521383204173, - "5": -2855.1671089762676, - "25": -1969.483606794242, - "50": -1447.1879016413761, - "75": -866.6265611311096, - "95": 2049.217650390811, - "99": 3312.4349928765846, - "99.9": 4011.5142868858347 - } - }, - "f3b": { - "units": "A", - "source": "ptdata:F3B", - "description": "Shaping F-coil F3B current (bank B).", - "min": -5503.943071765381, - "max": 4849.177948074737, - "mean": -1005.3848266601562, - "std": 1308.8258056640625, - "pct": { - "0.1": -4452.6277480541985, - "1": -3641.634707712471, - "5": -2937.4861003450947, - "25": -1881.7475544966392, - "50": -1170.6945714968547, - "75": -124.13671681902403, - "95": 1683.5400540223286, - "99": 3015.8060365193123, - "99.9": 3797.6599244161957 - } - }, - "f4b": { - "units": "A", - "source": "ptdata:F4B", - "description": "Shaping F-coil F4B current (bank B).", - "min": -5829.242194941551, - "max": 5787.149431930685, - "mean": 1124.2967529296875, - "std": 1519.5994873046875, - "pct": { - "0.1": -4083.976449898858, - "1": -3247.08251902718, - "5": -2270.942268479742, - "25": 376.8608226937906, - "50": 1392.450441038166, - "75": 2146.7001303629104, - "95": 3145.5476189867913, - "99": 3926.614817946318, - "99.9": 4582.551950710075 - } - }, - "f5b": { - "units": "A", - "source": "ptdata:F5B", - "description": "Shaping F-coil F5B current (bank B).", - "min": -5213.110339059254, - "max": 5388.213772287713, - "mean": 1443.536865234375, - "std": 1408.3306884765625, - "pct": { - "0.1": -4134.61747806435, - "1": -3056.873937432705, - "5": -1361.0988601293998, - "25": 675.1515533174199, - "50": 1572.802070225599, - "75": 2367.5452263604984, - "95": 3528.863240540377, - "99": 4411.454242162536, - "99.9": 4967.30642206674 - } - }, - "f6b": { - "units": "A", - "source": "ptdata:F6B", - "description": "Shaping F-coil F6B current (bank B).", - "min": -7604.653108484432, - "max": 7763.1261416792295, - "mean": -2463.248046875, - "std": 1836.4208984375, - "pct": { - "0.1": -6372.627428710043, - "1": -5251.4106280007745, - "5": -4318.157196234368, - "25": -3524.5849152058445, - "50": -2837.2759930056304, - "75": -2089.94465303326, - "95": 2871.6849973390945, - "99": 3948.010461650111, - "99.9": 4803.251616324593 - } - }, - "f7b": { - "units": "A", - "source": "ptdata:F7B", - "description": "Shaping F-coil F7B current (bank B).", - "min": -11380.254539563213, - "max": 9414.242772782009, - "mean": -2941.56005859375, - "std": 2510.1083984375, - "pct": { - "0.1": -9236.286164628174, - "1": -7962.01372128499, - "5": -6618.689743738845, - "25": -4397.68407591947, - "50": -3041.7944101983817, - "75": -2113.0768216001165, - "95": 2850.240503964187, - "99": 5238.131223534479, - "99.9": 6771.41582857779 - } - }, - "f8b": { - "units": "A", - "source": "ptdata:F8B", - "description": "Shaping F-coil F8B current (bank B).", - "min": -5834.457886045129, - "max": 5952.292180058913, - "mean": 1431.05615234375, - "std": 1718.2965087890625, - "pct": { - "0.1": -4377.886849186064, - "1": -3547.8568327724756, - "5": -2536.325388000092, - "25": 592.1441487378677, - "50": 1743.1741236182588, - "75": 2613.9050347435855, - "95": 3655.019608301406, - "99": 4295.252919476556, - "99.9": 5183.621783504976 - } - }, - "f9b": { - "units": "A", - "source": "ptdata:F9B", - "description": "Shaping F-coil F9B current (bank B).", - "min": -7298.33418485197, - "max": 8673.475372842513, - "mean": -214.02586364746094, - "std": 1388.83447265625, - "pct": { - "0.1": -4443.002941036773, - "1": -3335.961239603393, - "5": -2530.3434455144015, - "25": -1111.6205754278508, - "50": -212.41719832099042, - "75": 564.1401009862525, - "95": 2296.158459733251, - "99": 3401.023805016151, - "99.9": 4981.695296538042 - } - }, - "ecoila": { - "units": "A", - "source": "ptdata:ECOILA", - "description": "Ohmic E-coil bank A current.", - "min": -68526.67779690563, - "max": 65669.33446503483, - "mean": -6965.32666015625, - "std": 18940.9453125, - "pct": { - "0.1": -62521.0592220894, - "1": -53449.0677376177, - "5": -39610.65329064206, - "25": -19599.348704727538, - "50": -6887.604056684089, - "75": 6065.040591650557, - "95": 23926.96154448237, - "99": 33650.27142286909, - "99.9": 48164.54971213867 - } - }, - "ecoilb": { - "units": "A", - "source": "ptdata:ECOILB", - "description": "Ohmic E-coil bank B current.", - "min": -67880.78461590248, - "max": 67380.80764904841, - "mean": -6876.16455078125, - "std": 18723.662109375, - "pct": { - "0.1": -61839.528701402356, - "1": -52787.079189397904, - "5": -39153.2527665565, - "25": -19383.82435886666, - "50": -6768.996463787789, - "75": 6013.297288247475, - "95": 23686.641557508636, - "99": 33187.653018934754, - "99.9": 47362.43837391052 - } - }, - "gasa_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "description": "Calibrated gas injection flow, valve A.", - "min": -0.9805486760911233, - "max": 348.1779045740827, - "mean": 15.054444313049316, - "std": 26.369497299194336, - "pct": { - "0.1": -0.0181447514768128, - "1": 0.0006228885411054819, - "5": 0.0014589414841879034, - "25": 0.00852798057103854, - "50": 0.09974314587981326, - "75": 19.645558552678416, - "95": 71.02669389337856, - "99": 137.36341388263276, - "99.9": 211.79616738152396 - } - }, - "gasb_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "description": "Calibrated gas injection flow, valve B.", - "min": -0.5231055139632899, - "max": 317.69717326145866, - "mean": 1.386172890663147, - "std": 3.4090511798858643, - "pct": { - "0.1": 9.14047308575583e-06, - "1": 0.0007714573310613204, - "5": 0.002068321612864521, - "25": 0.009055124211873267, - "50": 0.07339015461169385, - "75": 1.9421402622606716, - "95": 1.9421402622606716, - "99": 23.663863921838843, - "99.9": 149.40068998150738 - } - }, - "gasc_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "description": "Calibrated gas injection flow, valve C.", - "min": -0.3965804467767108, - "max": 306.0269668007428, - "mean": 0.35034820437431335, - "std": 0.4470684826374054, - "pct": { - "0.1": 7.428448363699935e-05, - "1": 0.00026770734685732656, - "5": 0.0006667805693404416, - "25": 0.002788385500787083, - "50": 0.023577950502740697, - "75": 0.7508911827356307, - "95": 0.7508911827356307, - "99": 2.733332630282, - "99.9": 108.67323889612304 - } - }, - "gasd_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "description": "Calibrated gas injection flow, valve D.", - "min": -0.5287260135880842, - "max": 771.5043798529183, - "mean": 0.528103232383728, - "std": 0.654624342918396, - "pct": { - "0.1": 5.497087182604332e-05, - "1": 0.000175335120693898, - "5": 0.0005482846440516553, - "25": 0.003719433481388368, - "50": 0.08385269566973214, - "75": 1.0383906373403984, - "95": 1.0383906373403984, - "99": 4.359676988215197, - "99.9": 127.54440071212512 - } - }, - "gase_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "description": "Calibrated gas injection flow, valve E.", - "min": -0.2211384331710633, - "max": 672.8582070151267, - "mean": 0.27696067094802856, - "std": 0.17616958916187286, - "pct": { - "0.1": 0.00010156410138473793, - "1": 0.000223585566083373, - "5": 0.0005190716405260032, - "25": 0.011627604901727706, - "50": 0.3920832239686922, - "75": 0.3920832239686922, - "95": 0.3920832239686922, - "99": 0.3920832239686922, - "99.9": 29.75536079519976 - } - }, - "bt": { - "units": "T", - "source": "ptdata:bt", - "description": "Vacuum toroidal magnetic field (signed).", - "min": -2.2353815075115375, - "max": 2.25186423641397, - "mean": -0.971906840801239, - "std": 1.6484158039093018, - "pct": { - "0.1": -2.2151064134142304, - "1": -2.1819873443702726, - "5": -2.136304350652244, - "25": -2.0446028795017246, - "50": -1.8984274308309796, - "75": -1.0260122281948352, - "95": 2.053318112027725, - "99": 2.10945640328767, - "99.9": 2.1819705410137904 - } - } - } -} diff --git a/s1/fuse29_seq.onnx b/s1/fuse29_seq.onnx deleted file mode 100644 index bf1d603de4325bb45e2b05362d4169101267f890..0000000000000000000000000000000000000000 --- a/s1/fuse29_seq.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3469221c38b1006a017506969d2ffd5f9b84a9a34d22b4429184a299c2438f4a -size 45464382 diff --git a/s1/fuse29_step.onnx b/s1/fuse29_step.onnx deleted file mode 100644 index df2b8d4abc77c2d23eb3eed5b786217bd440ded4..0000000000000000000000000000000000000000 --- a/s1/fuse29_step.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8780126cca821664426bafdd896a1313846da69ad120b9c591d90dc0cc21249e -size 45081271 diff --git a/s1/model_config.json b/s1/model_config.json deleted file mode 100644 index 87bf92e3d72d52cec47bff91ba8ef8a26e0fdfb2..0000000000000000000000000000000000000000 --- a/s1/model_config.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "schema_version": 1, - "model": "fuse29", - "seed": 1, - "description": "29-input Mamba-2 pedestal predictor for DIII-D. Strictly causal, 20 Hz, nine heads at rho_tor = 0.85.", - "architecture": { - "family": "Mamba-2 (structured state-space duality)", - "d_model": 512, - "n_layers": 6, - "d_state": 128, - "d_conv": 4, - "expand": 2, - "headdim": 128, - "nheads": 8, - "ngroups": 2, - "chunk_size": 100, - "d_inner": 1024, - "conv_dim": 1536, - "n_params": 11254425 - }, - "cadence": { - "hz": 20, - "period_ms": 50.0, - "rho_tor": 0.85 - }, - "inputs": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "n": 29, - "units": { - "pinj": "MW", - "tinj": "N*m", - "ech_total": "MW", - "f1a": "A", - "f2a": "A", - "f3a": "A", - "f4a": "A", - "f5a": "A", - "f6a": "A", - "f7a": "A", - "f8a": "A", - "f9a": "A", - "f1b": "A", - "f2b": "A", - "f3b": "A", - "f4b": "A", - "f5b": "A", - "f6b": "A", - "f7b": "A", - "f8b": "A", - "f9b": "A", - "ecoila": "A", - "ecoilb": "A", - "gasa_cal": "Torr*L/s", - "gasb_cal": "Torr*L/s", - "gasc_cal": "Torr*L/s", - "gasd_cal": "Torr*L/s", - "gase_cal": "Torr*L/s", - "bt": "T" - }, - "sources": { - "pinj": "ptdata:bmspinj", - "tinj": "ptdata:bmstinj", - "ech_total": "ptdata:ECHPWR", - "f1a": "ptdata:F1A", - "f2a": "ptdata:F2A", - "f3a": "ptdata:F3A", - "f4a": "ptdata:F4A", - "f5a": "ptdata:F5A", - "f6a": "ptdata:F6A", - "f7a": "ptdata:F7A", - "f8a": "ptdata:F8A", - "f9a": "ptdata:F9A", - "f1b": "ptdata:F1B", - "f2b": "ptdata:F2B", - "f3b": "ptdata:F3B", - "f4b": "ptdata:F4B", - "f5b": "ptdata:F5B", - "f6b": "ptdata:F6B", - "f7b": "ptdata:F7B", - "f8b": "ptdata:F8B", - "f9b": "ptdata:F9B", - "ecoila": "ptdata:ECOILA", - "ecoilb": "ptdata:ECOILB", - "gasa_cal": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "gasb_cal": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "gasc_cal": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "gasd_cal": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "gase_cal": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "bt": "ptdata:bt" - }, - "descriptions": { - "pinj": "Neutral beam injected power, all sources.", - "tinj": "Neutral beam injected torque, all sources.", - "ech_total": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "f1a": "Shaping F-coil F1A current (bank A).", - "f2a": "Shaping F-coil F2A current (bank A).", - "f3a": "Shaping F-coil F3A current (bank A).", - "f4a": "Shaping F-coil F4A current (bank A).", - "f5a": "Shaping F-coil F5A current (bank A).", - "f6a": "Shaping F-coil F6A current (bank A).", - "f7a": "Shaping F-coil F7A current (bank A).", - "f8a": "Shaping F-coil F8A current (bank A).", - "f9a": "Shaping F-coil F9A current (bank A).", - "f1b": "Shaping F-coil F1B current (bank B).", - "f2b": "Shaping F-coil F2B current (bank B).", - "f3b": "Shaping F-coil F3B current (bank B).", - "f4b": "Shaping F-coil F4B current (bank B).", - "f5b": "Shaping F-coil F5B current (bank B).", - "f6b": "Shaping F-coil F6B current (bank B).", - "f7b": "Shaping F-coil F7B current (bank B).", - "f8b": "Shaping F-coil F8B current (bank B).", - "f9b": "Shaping F-coil F9B current (bank B).", - "ecoila": "Ohmic E-coil bank A current.", - "ecoilb": "Ohmic E-coil bank B current.", - "gasa_cal": "Calibrated gas injection flow, valve A.", - "gasb_cal": "Calibrated gas injection flow, valve B.", - "gasc_cal": "Calibrated gas injection flow, valve C.", - "gasd_cal": "Calibrated gas injection flow, valve D.", - "gase_cal": "Calibrated gas injection flow, valve E.", - "bt": "Vacuum toroidal magnetic field (signed)." - }, - "space": "raw physical units; the graph applies the z-score", - "note": "Check your units against actuator_ranges.json before trusting any output. A unit error produces confident nonsense rather than an exception." - }, - "outputs": { - "names": [ - "ne", - "te_ped", - "ti_ped", - "t_rot_ped", - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc", - "hmode" - ], - "n": 9, - "units": { - "ne": "1e19 m^-3", - "te_ped": "keV", - "ti_ped": "keV", - "t_rot_ped": "krad/s", - "neped_prmtan": "1e19 m^-3", - "teped_prmtan": "keV", - "rho_sym": "rho_tor (dimensionless)", - "ne_top_loc": "rho_tor (dimensionless)", - "hmode": "probability in [0, 1]" - }, - "note": "Physical units. hmode is a probability in [0, 1]; the graph applies the sigmoid.", - "hmode_gated": { - "heads": [ - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc" - ], - "indices": [ - 4, - 5, - 6, - 7 - ], - "threshold": 0.5, - "note": "These four heads were trained only on H-mode rows and are undefined otherwise. The graph does NOT gate them; the consumer must, using the model's own hmode output. See docs/GATING.md." - } - }, - "graphs": { - "fuse29_step.onnx": { - "purpose": "real-time, one 50 ms tick per call", - "inputs": { - "actuators": [ - "batch", - 29 - ], - "conv_state": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "outputs": { - "predictions": [ - "batch", - 9 - ], - "conv_state_out": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state_out": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "initial_state": "all zeros at the start of a shot", - "max_shot_length": "unbounded" - }, - "fuse29_seq.onnx": { - "purpose": "offline scoring of a whole shot", - "inputs": { - "actuators": [ - "batch", - 256, - 29 - ] - }, - "outputs": { - "predictions": [ - "batch", - 256, - 9 - ] - }, - "seq_len": 256, - "note": "Sequence length is FIXED. Right-pad shorter shots with zeros and read the first T outputs; the model is strictly causal so this is exact. For longer shots use the step graph or re-export with --seq-len." - } - }, - "dtype": "float32", - "onnx_opset": 17, - "training": { - "epoch": 22, - "val_loss": 1.1129196528345346, - "note": "See docs/TRAINING.md for the full recipe." - } -} diff --git a/s1/norms.json b/s1/norms.json deleted file mode 100644 index 98c8c06209fd050ed78c21fa5b30afd95a71c171..0000000000000000000000000000000000000000 --- a/s1/norms.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "schema_version": 2, - "note": "Statistics are baked into the shipped ONNX graphs. This file is for inspection and for reproducing the transform outside the graph; it is not required at inference time.", - "actuator_space": "physical", - "std_floor": 1e-06, - "clip_sigma": 20.0, - "provenance": { - "split": "train", - "n_shots": 32731, - "rho_index": 85, - "source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85, random stratified split (split_index.json)", - "note": "Recomputed on the NEW random train split. The source shards carried z-scores from the OLD chronological train split, whose shots overlap our test set. Actuator statistics are winsorised so a corrupted sample cannot set a channel's divisor.", - "inflated_channels": [ - "pinj", - "gasc_cal", - "gasd_cal", - "gase_cal" - ], - "actuator_estimator": "winsorised to p1..p99", - "actuator_space": "physical", - "composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "composition": "z = (x_phys - (m1 + s1*m2)) / (s1*s2), where (m1, s1) is the upstream FPE z-score and (m2, s2) is this model's re-scale onto its own training split" - }, - "actuators": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "mean": [ - 3.838883638381958, - 2.2043209075927734, - 2.6981112957000732, - -1382.3704833984375, - -1229.876708984375, - -592.7352294921875, - 1098.1622314453125, - 1173.57958984375, - -2493.411865234375, - -2367.570556640625, - 996.0214233398438, - -535.8018798828125, - -1373.1888427734375, - -1218.50048828125, - -1005.3848266601562, - 1124.2967529296875, - 1443.536865234375, - -2463.248046875, - -2941.56005859375, - 1431.05615234375, - -214.02586364746094, - -6965.32666015625, - -6876.16455078125, - 15.054444313049316, - 1.386172890663147, - 0.35034820437431335, - 0.528103232383728, - 0.27696067094802856, - -0.971906840801239 - ], - "std": [ - 3.0613932609558105, - 2.11222505569458, - 6.685519218444824, - 1349.629638671875, - 1248.3497314453125, - 1185.706298828125, - 1368.95458984375, - 1352.103759765625, - 1867.8076171875, - 1999.19970703125, - 1498.948974609375, - 1258.01171875, - 1367.82275390625, - 1316.67724609375, - 1308.8258056640625, - 1519.5994873046875, - 1408.3306884765625, - 1836.4208984375, - 2510.1083984375, - 1718.2965087890625, - 1388.83447265625, - 18940.9453125, - 18723.662109375, - 26.369497299194336, - 3.4090511798858643, - 0.4470684826374054, - 0.654624342918396, - 0.17616958916187286, - 1.6484158039093018 - ], - "transform": "z = clip((x - mean) / std, -clip_sigma, +clip_sigma), applied inside the graph" - }, - "targets": { - "ne": { - "mean": 2.7511744499206543, - "std": 1.654153823852539 - }, - "te_ped": { - "mean": 0.5915626287460327, - "std": 0.43467429280281067 - }, - "ti_ped": { - "mean": 1.016850233078003, - "std": 0.681096076965332 - }, - "t_rot_ped": { - "mean": 21.244613647460938, - "std": 16.59148406982422 - }, - "neped_prmtan": { - "mean": 2.7231285572052, - "std": 1.7005536556243896 - }, - "teped_prmtan": { - "mean": 0.46375223994255066, - "std": 0.36919456720352173 - }, - "rho_sym": { - "mean": 0.9757616519927979, - "std": 0.04329206794500351 - }, - "ne_top_loc": { - "mean": 0.9261865019798279, - "std": 0.049897171556949615 - } - }, - "hmode": { - "transform": "sigmoid", - "note": "hmode is a logit in the trunk; the graph applies the sigmoid." - }, - "stages": { - "note": "The composed actuator statistics above are the product of these two. Shown for traceability; use the composed values.", - "stage1_physical_to_fpe_zscore": { - "mean": [ - 2.8111997039100878, - 2.154143940948575, - 2.159654935239209, - -1444.0438445123289, - -1315.1185221229061, - -639.741760304047, - 1172.4978680515835, - 1222.4970107268077, - -2488.8410961768263, - -2491.3739557685253, - 1050.107386405324, - -578.9736547563273, - -1421.0817159358041, - -1285.3967398730092, - -1061.0290851406676, - 1186.4795970820587, - 1460.6822372728345, - -2452.093120847959, - -3071.3132492215186, - 1531.3304960724108, - -262.6728625067526, - -6887.604056684089, - -6768.996463787789, - 14.89178144369171, - 1.9421402622606716, - 0.7508911827356307, - 1.0383906373403984, - 0.3920832239686922, - -1.0310375752078498 - ], - "std": [ - 194.08418888726106, - 2.3684465859740262, - 5.948083564785035, - 1267.4907621702682, - 1217.4478106828162, - 1249.3915272640536, - 1345.3871181128568, - 1359.1934832307923, - 1887.1891497052302, - 1888.1014577442652, - 1559.9875106371376, - 1287.2118470203372, - 1271.813282654729, - 1259.8644805335082, - 1361.9306367877398, - 1521.172083160852, - 1393.2120473032558, - 1856.723912629122, - 2432.8530409799628, - 1705.6959050005082, - 1421.8036451037203, - 19092.148992270486, - 18858.28389193975, - 27.289184462156058, - 11.092415079529571, - 9.017289768908354, - 12.055982101097918, - 6.498888909025979, - 1.599000778986496 - ] - }, - "stage2_fpe_zscore_to_model": { - "mean": [ - 0.0052950419485569, - 0.02118559367954731, - 0.0905260294675827, - 0.04865782707929611, - 0.0700167864561081, - 0.03762352466583252, - -0.05525219440460205, - -0.03599006310105324, - -0.002421961398795247, - 0.06557027250528336, - -0.03467077016830444, - 0.03353898227214813, - 0.03765711933374405, - 0.05309795215725899, - 0.040856875479221344, - -0.04087827727198601, - -0.012306398712098598, - -0.006007813848555088, - 0.05333370715379715, - -0.05878793075680733, - 0.03421499580144882, - -0.004070908762514591, - -0.00568280229344964, - 0.005960696842521429, - -0.050121404230594635, - -0.04441944137215614, - -0.042326491326093674, - -0.017714189365506172, - 0.036979787051677704 - ], - "std": [ - 0.015773532912135124, - 0.8918187022209167, - 1.1239787340164185, - 1.0648043155670166, - 1.0253825187683105, - 0.9490270018577576, - 1.0175172090530396, - 0.994783878326416, - 0.9897299408912659, - 1.0588412284851074, - 0.9608724117279053, - 0.9773152470588684, - 1.0754902362823486, - 1.04509437084198, - 0.9610077142715454, - 0.9989661574363708, - 1.0108516216278076, - 0.9890651702880859, - 1.0317550897598267, - 1.007387399673462, - 0.9768117070198059, - 0.9920803308486938, - 0.9928614497184753, - 0.9662984609603882, - 0.30733174085617065, - 0.04957903176546097, - 0.05429871752858162, - 0.02710764855146408, - 1.030903697013855 - ] - } - } -} diff --git a/s1/provenance.json b/s1/provenance.json deleted file mode 100644 index 01787efee991138d657e4ed9aee9187fc75bd312..0000000000000000000000000000000000000000 --- a/s1/provenance.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "schema_version": 1, - "exported_utc": "2026-09-03T00:46:24.670692+00:00", - "seed": 1, - "source_checkpoint": "/flare/fusiondl_aesp/fuse_bd_model/fuse20/runs/fuse29r_s1/best_model.pt", - "source_checkpoint_sha256": "a77e8a7359c47e1f6d9a2406fe29fea9214e6110e3a4f5f26371afbaba236394", - "norms_source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json", - "norms_actuator_space": "physical", - "norms_composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "onnx_opset": 17, - "exporter": "torch.onnx.export (TorchScript, dynamo=False)", - "versions": { - "torch": "2.10.0a0+git449b176", - "python": "3.12.12", - "platform": "Linux-5.14.21-150400.24.235-default-x86_64-with-glibc2.31", - "onnx": "1.22.0", - "onnxruntime": "1.29.0" - }, - "artifacts": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "8780126cca821664426bafdd896a1313846da69ad120b9c591d90dc0cc21249e" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "3469221c38b1006a017506969d2ffd5f9b84a9a34d22b4429184a299c2438f4a" - } - } -} diff --git a/s2/README.md b/s2/README.md deleted file mode 100644 index af506c2804d41a5009ddf32683f4f608da4df376..0000000000000000000000000000000000000000 --- a/s2/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -license: mit -library_name: onnx -tags: - - onnx - - fusion - - plasma-physics - - tokamak - - diii-d - - mamba ---- - -# fuse29 — seed 2 - -This is seed 2, one of eight independently trained runs. Seed 0 is the champion and the default; this one exists so you can measure spread across training runs. Unless you are doing that, you want seed 0. - -29-input Mamba-2 pedestal predictor for DIII-D. Raw physical units in, -physical units out. See the [root model card](https://huggingface.co/SCS-Lab/FUSE29-Pedestal-model) -for the full description, I/O contract, accuracy and limitations. - -| | | -|---|---| -| Seed | 2 | -| Parameters | 11,254,425 | -| Best validation loss | 1.1197 | -| Sequence graph length | 256 ticks | -| ONNX opset | 17 | -| Exported | 2026-09-03T00:46:27.308435+00:00 | -| Source checkpoint SHA-256 | `d113f84516d9e749…` | - -## Load - -```python -from fuse29.runtime import Fuse29Predictor - -predictor = Fuse29Predictor.from_pretrained("SCS-Lab/FUSE29-Pedestal-model", seed=2) -``` - -## Files - -| File | | -|---|---| -| `fuse29_step.onnx` | one 50 ms tick, carries state, no length limit | -| `fuse29_seq.onnx` | whole shot at a fixed 256 ticks | -| `model_config.json` | I/O contract: names, order, units, sources, shapes | -| `norms.json` | the statistics baked into the graphs | -| `actuator_ranges.json` | training-split distribution, for checking your units | -| `provenance.json` | source checkpoint hash, library versions, artefact hashes | - -## Before you use it - -- Four heads (`neped_prmtan`, `teped_prmtan`, `rho_sym`, `ne_top_loc`) are - **only valid in H-mode** and the graph does not gate them. Gate on the - model's own `hmode` output. -- `pinj` is in **MW**, not W. Run `predictor.check_units(shot)` once. -- Output column order is not alphabetical. See `model_config.json`. diff --git a/s2/actuator_ranges.json b/s2/actuator_ranges.json deleted file mode 100644 index 08d19f4e80f49e6bbd18c40674b06946a02cc61a..0000000000000000000000000000000000000000 --- a/s2/actuator_ranges.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "schema_version": 1, - "note": "Physical-units distribution of each actuator over the training split. Use it to check that your signals are in the units the graph expects; a unit error is the one preprocessing mistake that produces confident nonsense rather than an exception.", - "split": "train", - "n_shots": 32731, - "n_ticks": 3020926, - "percentiles": [ - 0.1, - 1, - 5, - 25, - 50, - 75, - 95, - 99, - 99.9 - ], - "channels": { - "pinj": { - "units": "MW", - "source": "ptdata:bmspinj", - "description": "Neutral beam injected power, all sources.", - "min": -46005.02701919088, - "max": 17.512712760455507, - "mean": 3.838883638381958, - "std": 3.0613932609558105, - "pct": { - "0.1": -0.004132416388869853, - "1": 4.112187479421436e-09, - "5": 4.112187479421436e-09, - "25": 1.311169336894574, - "50": 3.18466408866965, - "75": 5.748764762873332, - "95": 9.841882532311711, - "99": 12.212702351352696, - "99.9": 14.791924355083399 - } - }, - "tinj": { - "units": "N*m", - "source": "ptdata:bmstinj", - "description": "Neutral beam injected torque, all sources.", - "min": -56.644382966354534, - "max": 129.9833380295058, - "mean": 2.2043209075927734, - "std": 2.11222505569458, - "pct": { - "0.1": -2.0636791725994676, - "1": -0.5384317586520496, - "5": -1.6338495756329507e-07, - "25": 0.4319133403840452, - "50": 1.963846077087278, - "75": 3.1821234334199193, - "95": 6.641525317445799, - "99": 8.941231792062355, - "99.9": 11.156712776956862 - } - }, - "ech_total": { - "units": "MW", - "source": "ptdata:ECHPWR", - "description": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "min": -19.31181996542309, - "max": 40.286455582885246, - "mean": 2.6981112957000732, - "std": 6.685519218444824, - "pct": { - "0.1": -1.0663586061709935, - "1": -0.09982622583332723, - "5": -0.020836448436920674, - "25": -3.2566890961760464e-08, - "50": -3.2566890961760464e-08, - "75": 1.1717011943616973, - "95": 21.558252060431304, - "99": 30.476182922859127, - "99.9": 37.09168917133024 - } - }, - "f1a": { - "units": "A", - "source": "ptdata:F1A", - "description": "Shaping F-coil F1A current (bank A).", - "min": -5776.925892871883, - "max": 5794.3504737288395, - "mean": -1382.3704833984375, - "std": 1349.629638671875, - "pct": { - "0.1": -4852.691808601986, - "1": -4131.456225748339, - "5": -3401.8604035239678, - "25": -2236.4754469921672, - "50": -1501.5458201268116, - "75": -660.4245966463927, - "95": 1294.4315819071094, - "99": 3103.250955923345, - "99.9": 4467.289606367005 - } - }, - "f2a": { - "units": "A", - "source": "ptdata:F2A", - "description": "Shaping F-coil F2A current (bank A).", - "min": -5716.347659616551, - "max": 5702.840977614059, - "mean": -1229.876708984375, - "std": 1248.3497314453125, - "pct": { - "0.1": -4093.397230708888, - "1": -3297.8668360449756, - "5": -2712.522533155646, - "25": -2004.455454331444, - "50": -1443.842241803098, - "75": -854.5004209979342, - "95": 1825.579117167513, - "99": 3097.0902901803724, - "99.9": 3899.548655232026 - } - }, - "f3a": { - "units": "A", - "source": "ptdata:F3A", - "description": "Shaping F-coil F3A current (bank A).", - "min": -5498.272347966228, - "max": 5321.719922394657, - "mean": -592.7352294921875, - "std": 1185.706298828125, - "pct": { - "0.1": -4140.690909683277, - "1": -3539.2136012211317, - "5": -2813.2888996278725, - "25": -1377.7435033975407, - "50": -152.16189816331342, - "75": 2.4453898354848604, - "95": 1203.107532773337, - "99": 2898.3184344684487, - "99.9": 3780.0556837479485 - } - }, - "f4a": { - "units": "A", - "source": "ptdata:F4A", - "description": "Shaping F-coil F4A current (bank A).", - "min": -5876.373800845117, - "max": 5855.700219305917, - "mean": 1098.1622314453125, - "std": 1368.95458984375, - "pct": { - "0.1": -4331.218505807293, - "1": -3344.4526378786877, - "5": -1858.4157962413597, - "25": 395.84891116184133, - "50": 1143.436262581068, - "75": 1990.2677717095535, - "95": 3141.5448401142426, - "99": 3756.430079500399, - "99.9": 4525.754910416766 - } - }, - "f5a": { - "units": "A", - "source": "ptdata:F5A", - "description": "Shaping F-coil F5A current (bank A).", - "min": -5178.8539079385355, - "max": 5353.141466672798, - "mean": 1173.57958984375, - "std": 1352.103759765625, - "pct": { - "0.1": -4592.7059148331355, - "1": -3597.7201189044818, - "5": -1551.4942446467403, - "25": 543.836095032849, - "50": 1273.969119983141, - "75": 2051.0443148459794, - "95": 3019.669622905384, - "99": 3875.454685744494, - "99.9": 4738.506855960392 - } - }, - "f6a": { - "units": "A", - "source": "ptdata:F6A", - "description": "Shaping F-coil F6A current (bank A).", - "min": -7929.903731492232, - "max": 5741.056818467809, - "mean": -2493.411865234375, - "std": 1867.8076171875, - "pct": { - "0.1": -6125.90268588119, - "1": -4963.398523516425, - "5": -4319.477588996284, - "25": -3574.8234234024885, - "50": -2898.635802832382, - "75": -2143.0930801744807, - "95": 2999.75903843203, - "99": 4137.6543157735705, - "99.9": 4783.375582166487 - } - }, - "f7a": { - "units": "A", - "source": "ptdata:F7A", - "description": "Shaping F-coil F7A current (bank A).", - "min": -9825.736080045011, - "max": 8678.484606762057, - "mean": -2367.570556640625, - "std": 1999.19970703125, - "pct": { - "0.1": -7676.219824168618, - "1": -6127.379912259545, - "5": -4909.893927511103, - "25": -3430.1309476786882, - "50": -2697.460342263373, - "75": -1913.0579478721388, - "95": 2723.164038733837, - "99": 3948.221013655396, - "99.9": 5316.086800760559 - } - }, - "f8a": { - "units": "A", - "source": "ptdata:F8A", - "description": "Shaping F-coil F8A current (bank A).", - "min": -5378.835169240788, - "max": 5880.767402237174, - "mean": 996.0214233398438, - "std": 1498.948974609375, - "pct": { - "0.1": -4229.744640827867, - "1": -3363.368412210415, - "5": -1922.2114690963926, - "25": 60.761390529545906, - "50": 1153.9241798399726, - "75": 1951.1572686642544, - "95": 3318.078493605748, - "99": 3973.7764489149104, - "99.9": 4670.296725684707 - } - }, - "f9a": { - "units": "A", - "source": "ptdata:F9A", - "description": "Shaping F-coil F9A current (bank A).", - "min": -7206.032812499594, - "max": 8700.684616308497, - "mean": -535.8018798828125, - "std": 1258.01171875, - "pct": { - "0.1": -4739.927394914494, - "1": -3344.557163847978, - "5": -2567.420669960383, - "25": -1538.6304412830955, - "50": -578.9736547563273, - "75": 353.08467764596537, - "95": 1558.2607279613098, - "99": 2657.691791383836, - "99.9": 4334.930796170508 - } - }, - "f1b": { - "units": "A", - "source": "ptdata:F1B", - "description": "Shaping F-coil F1B current (bank B).", - "min": -5921.943154546981, - "max": 5407.326196618229, - "mean": -1373.1888427734375, - "std": 1367.82275390625, - "pct": { - "0.1": -5179.567735964654, - "1": -4339.478258925401, - "5": -3463.431883510691, - "25": -2205.922070942479, - "50": -1459.5306304510002, - "75": -750.1948036110768, - "95": 1428.796834935177, - "99": 3233.0438718527407, - "99.9": 4240.724502122051 - } - }, - "f2b": { - "units": "A", - "source": "ptdata:F2B", - "description": "Shaping F-coil F2B current (bank B).", - "min": -5788.286812358208, - "max": 5428.562849130928, - "mean": -1218.50048828125, - "std": 1316.67724609375, - "pct": { - "0.1": -4785.998935671587, - "1": -3520.521383204173, - "5": -2855.1671089762676, - "25": -1969.483606794242, - "50": -1447.1879016413761, - "75": -866.6265611311096, - "95": 2049.217650390811, - "99": 3312.4349928765846, - "99.9": 4011.5142868858347 - } - }, - "f3b": { - "units": "A", - "source": "ptdata:F3B", - "description": "Shaping F-coil F3B current (bank B).", - "min": -5503.943071765381, - "max": 4849.177948074737, - "mean": -1005.3848266601562, - "std": 1308.8258056640625, - "pct": { - "0.1": -4452.6277480541985, - "1": -3641.634707712471, - "5": -2937.4861003450947, - "25": -1881.7475544966392, - "50": -1170.6945714968547, - "75": -124.13671681902403, - "95": 1683.5400540223286, - "99": 3015.8060365193123, - "99.9": 3797.6599244161957 - } - }, - "f4b": { - "units": "A", - "source": "ptdata:F4B", - "description": "Shaping F-coil F4B current (bank B).", - "min": -5829.242194941551, - "max": 5787.149431930685, - "mean": 1124.2967529296875, - "std": 1519.5994873046875, - "pct": { - "0.1": -4083.976449898858, - "1": -3247.08251902718, - "5": -2270.942268479742, - "25": 376.8608226937906, - "50": 1392.450441038166, - "75": 2146.7001303629104, - "95": 3145.5476189867913, - "99": 3926.614817946318, - "99.9": 4582.551950710075 - } - }, - "f5b": { - "units": "A", - "source": "ptdata:F5B", - "description": "Shaping F-coil F5B current (bank B).", - "min": -5213.110339059254, - "max": 5388.213772287713, - "mean": 1443.536865234375, - "std": 1408.3306884765625, - "pct": { - "0.1": -4134.61747806435, - "1": -3056.873937432705, - "5": -1361.0988601293998, - "25": 675.1515533174199, - "50": 1572.802070225599, - "75": 2367.5452263604984, - "95": 3528.863240540377, - "99": 4411.454242162536, - "99.9": 4967.30642206674 - } - }, - "f6b": { - "units": "A", - "source": "ptdata:F6B", - "description": "Shaping F-coil F6B current (bank B).", - "min": -7604.653108484432, - "max": 7763.1261416792295, - "mean": -2463.248046875, - "std": 1836.4208984375, - "pct": { - "0.1": -6372.627428710043, - "1": -5251.4106280007745, - "5": -4318.157196234368, - "25": -3524.5849152058445, - "50": -2837.2759930056304, - "75": -2089.94465303326, - "95": 2871.6849973390945, - "99": 3948.010461650111, - "99.9": 4803.251616324593 - } - }, - "f7b": { - "units": "A", - "source": "ptdata:F7B", - "description": "Shaping F-coil F7B current (bank B).", - "min": -11380.254539563213, - "max": 9414.242772782009, - "mean": -2941.56005859375, - "std": 2510.1083984375, - "pct": { - "0.1": -9236.286164628174, - "1": -7962.01372128499, - "5": -6618.689743738845, - "25": -4397.68407591947, - "50": -3041.7944101983817, - "75": -2113.0768216001165, - "95": 2850.240503964187, - "99": 5238.131223534479, - "99.9": 6771.41582857779 - } - }, - "f8b": { - "units": "A", - "source": "ptdata:F8B", - "description": "Shaping F-coil F8B current (bank B).", - "min": -5834.457886045129, - "max": 5952.292180058913, - "mean": 1431.05615234375, - "std": 1718.2965087890625, - "pct": { - "0.1": -4377.886849186064, - "1": -3547.8568327724756, - "5": -2536.325388000092, - "25": 592.1441487378677, - "50": 1743.1741236182588, - "75": 2613.9050347435855, - "95": 3655.019608301406, - "99": 4295.252919476556, - "99.9": 5183.621783504976 - } - }, - "f9b": { - "units": "A", - "source": "ptdata:F9B", - "description": "Shaping F-coil F9B current (bank B).", - "min": -7298.33418485197, - "max": 8673.475372842513, - "mean": -214.02586364746094, - "std": 1388.83447265625, - "pct": { - "0.1": -4443.002941036773, - "1": -3335.961239603393, - "5": -2530.3434455144015, - "25": -1111.6205754278508, - "50": -212.41719832099042, - "75": 564.1401009862525, - "95": 2296.158459733251, - "99": 3401.023805016151, - "99.9": 4981.695296538042 - } - }, - "ecoila": { - "units": "A", - "source": "ptdata:ECOILA", - "description": "Ohmic E-coil bank A current.", - "min": -68526.67779690563, - "max": 65669.33446503483, - "mean": -6965.32666015625, - "std": 18940.9453125, - "pct": { - "0.1": -62521.0592220894, - "1": -53449.0677376177, - "5": -39610.65329064206, - "25": -19599.348704727538, - "50": -6887.604056684089, - "75": 6065.040591650557, - "95": 23926.96154448237, - "99": 33650.27142286909, - "99.9": 48164.54971213867 - } - }, - "ecoilb": { - "units": "A", - "source": "ptdata:ECOILB", - "description": "Ohmic E-coil bank B current.", - "min": -67880.78461590248, - "max": 67380.80764904841, - "mean": -6876.16455078125, - "std": 18723.662109375, - "pct": { - "0.1": -61839.528701402356, - "1": -52787.079189397904, - "5": -39153.2527665565, - "25": -19383.82435886666, - "50": -6768.996463787789, - "75": 6013.297288247475, - "95": 23686.641557508636, - "99": 33187.653018934754, - "99.9": 47362.43837391052 - } - }, - "gasa_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "description": "Calibrated gas injection flow, valve A.", - "min": -0.9805486760911233, - "max": 348.1779045740827, - "mean": 15.054444313049316, - "std": 26.369497299194336, - "pct": { - "0.1": -0.0181447514768128, - "1": 0.0006228885411054819, - "5": 0.0014589414841879034, - "25": 0.00852798057103854, - "50": 0.09974314587981326, - "75": 19.645558552678416, - "95": 71.02669389337856, - "99": 137.36341388263276, - "99.9": 211.79616738152396 - } - }, - "gasb_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "description": "Calibrated gas injection flow, valve B.", - "min": -0.5231055139632899, - "max": 317.69717326145866, - "mean": 1.386172890663147, - "std": 3.4090511798858643, - "pct": { - "0.1": 9.14047308575583e-06, - "1": 0.0007714573310613204, - "5": 0.002068321612864521, - "25": 0.009055124211873267, - "50": 0.07339015461169385, - "75": 1.9421402622606716, - "95": 1.9421402622606716, - "99": 23.663863921838843, - "99.9": 149.40068998150738 - } - }, - "gasc_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "description": "Calibrated gas injection flow, valve C.", - "min": -0.3965804467767108, - "max": 306.0269668007428, - "mean": 0.35034820437431335, - "std": 0.4470684826374054, - "pct": { - "0.1": 7.428448363699935e-05, - "1": 0.00026770734685732656, - "5": 0.0006667805693404416, - "25": 0.002788385500787083, - "50": 0.023577950502740697, - "75": 0.7508911827356307, - "95": 0.7508911827356307, - "99": 2.733332630282, - "99.9": 108.67323889612304 - } - }, - "gasd_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "description": "Calibrated gas injection flow, valve D.", - "min": -0.5287260135880842, - "max": 771.5043798529183, - "mean": 0.528103232383728, - "std": 0.654624342918396, - "pct": { - "0.1": 5.497087182604332e-05, - "1": 0.000175335120693898, - "5": 0.0005482846440516553, - "25": 0.003719433481388368, - "50": 0.08385269566973214, - "75": 1.0383906373403984, - "95": 1.0383906373403984, - "99": 4.359676988215197, - "99.9": 127.54440071212512 - } - }, - "gase_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "description": "Calibrated gas injection flow, valve E.", - "min": -0.2211384331710633, - "max": 672.8582070151267, - "mean": 0.27696067094802856, - "std": 0.17616958916187286, - "pct": { - "0.1": 0.00010156410138473793, - "1": 0.000223585566083373, - "5": 0.0005190716405260032, - "25": 0.011627604901727706, - "50": 0.3920832239686922, - "75": 0.3920832239686922, - "95": 0.3920832239686922, - "99": 0.3920832239686922, - "99.9": 29.75536079519976 - } - }, - "bt": { - "units": "T", - "source": "ptdata:bt", - "description": "Vacuum toroidal magnetic field (signed).", - "min": -2.2353815075115375, - "max": 2.25186423641397, - "mean": -0.971906840801239, - "std": 1.6484158039093018, - "pct": { - "0.1": -2.2151064134142304, - "1": -2.1819873443702726, - "5": -2.136304350652244, - "25": -2.0446028795017246, - "50": -1.8984274308309796, - "75": -1.0260122281948352, - "95": 2.053318112027725, - "99": 2.10945640328767, - "99.9": 2.1819705410137904 - } - } - } -} diff --git a/s2/fuse29_seq.onnx b/s2/fuse29_seq.onnx deleted file mode 100644 index 59a55d715bafb537b8d2ec73438db031a6e8060c..0000000000000000000000000000000000000000 --- a/s2/fuse29_seq.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1fc339449427dfe47ee425eb7ff500887e6a10ae1ef32d90207f2d1e3a828cf3 -size 45464382 diff --git a/s2/fuse29_step.onnx b/s2/fuse29_step.onnx deleted file mode 100644 index 3c41dfc6f41045727c42409b189bf7cb1189d54e..0000000000000000000000000000000000000000 --- a/s2/fuse29_step.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b696b9c645441cde3881ff796aaec6e1927335daba4539095f6b6dee8a5768f4 -size 45081271 diff --git a/s2/model_config.json b/s2/model_config.json deleted file mode 100644 index 5919980ca3ef220791b9a8062073eca3c7978c30..0000000000000000000000000000000000000000 --- a/s2/model_config.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "schema_version": 1, - "model": "fuse29", - "seed": 2, - "description": "29-input Mamba-2 pedestal predictor for DIII-D. Strictly causal, 20 Hz, nine heads at rho_tor = 0.85.", - "architecture": { - "family": "Mamba-2 (structured state-space duality)", - "d_model": 512, - "n_layers": 6, - "d_state": 128, - "d_conv": 4, - "expand": 2, - "headdim": 128, - "nheads": 8, - "ngroups": 2, - "chunk_size": 100, - "d_inner": 1024, - "conv_dim": 1536, - "n_params": 11254425 - }, - "cadence": { - "hz": 20, - "period_ms": 50.0, - "rho_tor": 0.85 - }, - "inputs": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "n": 29, - "units": { - "pinj": "MW", - "tinj": "N*m", - "ech_total": "MW", - "f1a": "A", - "f2a": "A", - "f3a": "A", - "f4a": "A", - "f5a": "A", - "f6a": "A", - "f7a": "A", - "f8a": "A", - "f9a": "A", - "f1b": "A", - "f2b": "A", - "f3b": "A", - "f4b": "A", - "f5b": "A", - "f6b": "A", - "f7b": "A", - "f8b": "A", - "f9b": "A", - "ecoila": "A", - "ecoilb": "A", - "gasa_cal": "Torr*L/s", - "gasb_cal": "Torr*L/s", - "gasc_cal": "Torr*L/s", - "gasd_cal": "Torr*L/s", - "gase_cal": "Torr*L/s", - "bt": "T" - }, - "sources": { - "pinj": "ptdata:bmspinj", - "tinj": "ptdata:bmstinj", - "ech_total": "ptdata:ECHPWR", - "f1a": "ptdata:F1A", - "f2a": "ptdata:F2A", - "f3a": "ptdata:F3A", - "f4a": "ptdata:F4A", - "f5a": "ptdata:F5A", - "f6a": "ptdata:F6A", - "f7a": "ptdata:F7A", - "f8a": "ptdata:F8A", - "f9a": "ptdata:F9A", - "f1b": "ptdata:F1B", - "f2b": "ptdata:F2B", - "f3b": "ptdata:F3B", - "f4b": "ptdata:F4B", - "f5b": "ptdata:F5B", - "f6b": "ptdata:F6B", - "f7b": "ptdata:F7B", - "f8b": "ptdata:F8B", - "f9b": "ptdata:F9B", - "ecoila": "ptdata:ECOILA", - "ecoilb": "ptdata:ECOILB", - "gasa_cal": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "gasb_cal": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "gasc_cal": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "gasd_cal": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "gase_cal": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "bt": "ptdata:bt" - }, - "descriptions": { - "pinj": "Neutral beam injected power, all sources.", - "tinj": "Neutral beam injected torque, all sources.", - "ech_total": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "f1a": "Shaping F-coil F1A current (bank A).", - "f2a": "Shaping F-coil F2A current (bank A).", - "f3a": "Shaping F-coil F3A current (bank A).", - "f4a": "Shaping F-coil F4A current (bank A).", - "f5a": "Shaping F-coil F5A current (bank A).", - "f6a": "Shaping F-coil F6A current (bank A).", - "f7a": "Shaping F-coil F7A current (bank A).", - "f8a": "Shaping F-coil F8A current (bank A).", - "f9a": "Shaping F-coil F9A current (bank A).", - "f1b": "Shaping F-coil F1B current (bank B).", - "f2b": "Shaping F-coil F2B current (bank B).", - "f3b": "Shaping F-coil F3B current (bank B).", - "f4b": "Shaping F-coil F4B current (bank B).", - "f5b": "Shaping F-coil F5B current (bank B).", - "f6b": "Shaping F-coil F6B current (bank B).", - "f7b": "Shaping F-coil F7B current (bank B).", - "f8b": "Shaping F-coil F8B current (bank B).", - "f9b": "Shaping F-coil F9B current (bank B).", - "ecoila": "Ohmic E-coil bank A current.", - "ecoilb": "Ohmic E-coil bank B current.", - "gasa_cal": "Calibrated gas injection flow, valve A.", - "gasb_cal": "Calibrated gas injection flow, valve B.", - "gasc_cal": "Calibrated gas injection flow, valve C.", - "gasd_cal": "Calibrated gas injection flow, valve D.", - "gase_cal": "Calibrated gas injection flow, valve E.", - "bt": "Vacuum toroidal magnetic field (signed)." - }, - "space": "raw physical units; the graph applies the z-score", - "note": "Check your units against actuator_ranges.json before trusting any output. A unit error produces confident nonsense rather than an exception." - }, - "outputs": { - "names": [ - "ne", - "te_ped", - "ti_ped", - "t_rot_ped", - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc", - "hmode" - ], - "n": 9, - "units": { - "ne": "1e19 m^-3", - "te_ped": "keV", - "ti_ped": "keV", - "t_rot_ped": "krad/s", - "neped_prmtan": "1e19 m^-3", - "teped_prmtan": "keV", - "rho_sym": "rho_tor (dimensionless)", - "ne_top_loc": "rho_tor (dimensionless)", - "hmode": "probability in [0, 1]" - }, - "note": "Physical units. hmode is a probability in [0, 1]; the graph applies the sigmoid.", - "hmode_gated": { - "heads": [ - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc" - ], - "indices": [ - 4, - 5, - 6, - 7 - ], - "threshold": 0.5, - "note": "These four heads were trained only on H-mode rows and are undefined otherwise. The graph does NOT gate them; the consumer must, using the model's own hmode output. See docs/GATING.md." - } - }, - "graphs": { - "fuse29_step.onnx": { - "purpose": "real-time, one 50 ms tick per call", - "inputs": { - "actuators": [ - "batch", - 29 - ], - "conv_state": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "outputs": { - "predictions": [ - "batch", - 9 - ], - "conv_state_out": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state_out": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "initial_state": "all zeros at the start of a shot", - "max_shot_length": "unbounded" - }, - "fuse29_seq.onnx": { - "purpose": "offline scoring of a whole shot", - "inputs": { - "actuators": [ - "batch", - 256, - 29 - ] - }, - "outputs": { - "predictions": [ - "batch", - 256, - 9 - ] - }, - "seq_len": 256, - "note": "Sequence length is FIXED. Right-pad shorter shots with zeros and read the first T outputs; the model is strictly causal so this is exact. For longer shots use the step graph or re-export with --seq-len." - } - }, - "dtype": "float32", - "onnx_opset": 17, - "training": { - "epoch": 20, - "val_loss": 1.119664316996932, - "note": "See docs/TRAINING.md for the full recipe." - } -} diff --git a/s2/norms.json b/s2/norms.json deleted file mode 100644 index 98c8c06209fd050ed78c21fa5b30afd95a71c171..0000000000000000000000000000000000000000 --- a/s2/norms.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "schema_version": 2, - "note": "Statistics are baked into the shipped ONNX graphs. This file is for inspection and for reproducing the transform outside the graph; it is not required at inference time.", - "actuator_space": "physical", - "std_floor": 1e-06, - "clip_sigma": 20.0, - "provenance": { - "split": "train", - "n_shots": 32731, - "rho_index": 85, - "source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85, random stratified split (split_index.json)", - "note": "Recomputed on the NEW random train split. The source shards carried z-scores from the OLD chronological train split, whose shots overlap our test set. Actuator statistics are winsorised so a corrupted sample cannot set a channel's divisor.", - "inflated_channels": [ - "pinj", - "gasc_cal", - "gasd_cal", - "gase_cal" - ], - "actuator_estimator": "winsorised to p1..p99", - "actuator_space": "physical", - "composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "composition": "z = (x_phys - (m1 + s1*m2)) / (s1*s2), where (m1, s1) is the upstream FPE z-score and (m2, s2) is this model's re-scale onto its own training split" - }, - "actuators": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "mean": [ - 3.838883638381958, - 2.2043209075927734, - 2.6981112957000732, - -1382.3704833984375, - -1229.876708984375, - -592.7352294921875, - 1098.1622314453125, - 1173.57958984375, - -2493.411865234375, - -2367.570556640625, - 996.0214233398438, - -535.8018798828125, - -1373.1888427734375, - -1218.50048828125, - -1005.3848266601562, - 1124.2967529296875, - 1443.536865234375, - -2463.248046875, - -2941.56005859375, - 1431.05615234375, - -214.02586364746094, - -6965.32666015625, - -6876.16455078125, - 15.054444313049316, - 1.386172890663147, - 0.35034820437431335, - 0.528103232383728, - 0.27696067094802856, - -0.971906840801239 - ], - "std": [ - 3.0613932609558105, - 2.11222505569458, - 6.685519218444824, - 1349.629638671875, - 1248.3497314453125, - 1185.706298828125, - 1368.95458984375, - 1352.103759765625, - 1867.8076171875, - 1999.19970703125, - 1498.948974609375, - 1258.01171875, - 1367.82275390625, - 1316.67724609375, - 1308.8258056640625, - 1519.5994873046875, - 1408.3306884765625, - 1836.4208984375, - 2510.1083984375, - 1718.2965087890625, - 1388.83447265625, - 18940.9453125, - 18723.662109375, - 26.369497299194336, - 3.4090511798858643, - 0.4470684826374054, - 0.654624342918396, - 0.17616958916187286, - 1.6484158039093018 - ], - "transform": "z = clip((x - mean) / std, -clip_sigma, +clip_sigma), applied inside the graph" - }, - "targets": { - "ne": { - "mean": 2.7511744499206543, - "std": 1.654153823852539 - }, - "te_ped": { - "mean": 0.5915626287460327, - "std": 0.43467429280281067 - }, - "ti_ped": { - "mean": 1.016850233078003, - "std": 0.681096076965332 - }, - "t_rot_ped": { - "mean": 21.244613647460938, - "std": 16.59148406982422 - }, - "neped_prmtan": { - "mean": 2.7231285572052, - "std": 1.7005536556243896 - }, - "teped_prmtan": { - "mean": 0.46375223994255066, - "std": 0.36919456720352173 - }, - "rho_sym": { - "mean": 0.9757616519927979, - "std": 0.04329206794500351 - }, - "ne_top_loc": { - "mean": 0.9261865019798279, - "std": 0.049897171556949615 - } - }, - "hmode": { - "transform": "sigmoid", - "note": "hmode is a logit in the trunk; the graph applies the sigmoid." - }, - "stages": { - "note": "The composed actuator statistics above are the product of these two. Shown for traceability; use the composed values.", - "stage1_physical_to_fpe_zscore": { - "mean": [ - 2.8111997039100878, - 2.154143940948575, - 2.159654935239209, - -1444.0438445123289, - -1315.1185221229061, - -639.741760304047, - 1172.4978680515835, - 1222.4970107268077, - -2488.8410961768263, - -2491.3739557685253, - 1050.107386405324, - -578.9736547563273, - -1421.0817159358041, - -1285.3967398730092, - -1061.0290851406676, - 1186.4795970820587, - 1460.6822372728345, - -2452.093120847959, - -3071.3132492215186, - 1531.3304960724108, - -262.6728625067526, - -6887.604056684089, - -6768.996463787789, - 14.89178144369171, - 1.9421402622606716, - 0.7508911827356307, - 1.0383906373403984, - 0.3920832239686922, - -1.0310375752078498 - ], - "std": [ - 194.08418888726106, - 2.3684465859740262, - 5.948083564785035, - 1267.4907621702682, - 1217.4478106828162, - 1249.3915272640536, - 1345.3871181128568, - 1359.1934832307923, - 1887.1891497052302, - 1888.1014577442652, - 1559.9875106371376, - 1287.2118470203372, - 1271.813282654729, - 1259.8644805335082, - 1361.9306367877398, - 1521.172083160852, - 1393.2120473032558, - 1856.723912629122, - 2432.8530409799628, - 1705.6959050005082, - 1421.8036451037203, - 19092.148992270486, - 18858.28389193975, - 27.289184462156058, - 11.092415079529571, - 9.017289768908354, - 12.055982101097918, - 6.498888909025979, - 1.599000778986496 - ] - }, - "stage2_fpe_zscore_to_model": { - "mean": [ - 0.0052950419485569, - 0.02118559367954731, - 0.0905260294675827, - 0.04865782707929611, - 0.0700167864561081, - 0.03762352466583252, - -0.05525219440460205, - -0.03599006310105324, - -0.002421961398795247, - 0.06557027250528336, - -0.03467077016830444, - 0.03353898227214813, - 0.03765711933374405, - 0.05309795215725899, - 0.040856875479221344, - -0.04087827727198601, - -0.012306398712098598, - -0.006007813848555088, - 0.05333370715379715, - -0.05878793075680733, - 0.03421499580144882, - -0.004070908762514591, - -0.00568280229344964, - 0.005960696842521429, - -0.050121404230594635, - -0.04441944137215614, - -0.042326491326093674, - -0.017714189365506172, - 0.036979787051677704 - ], - "std": [ - 0.015773532912135124, - 0.8918187022209167, - 1.1239787340164185, - 1.0648043155670166, - 1.0253825187683105, - 0.9490270018577576, - 1.0175172090530396, - 0.994783878326416, - 0.9897299408912659, - 1.0588412284851074, - 0.9608724117279053, - 0.9773152470588684, - 1.0754902362823486, - 1.04509437084198, - 0.9610077142715454, - 0.9989661574363708, - 1.0108516216278076, - 0.9890651702880859, - 1.0317550897598267, - 1.007387399673462, - 0.9768117070198059, - 0.9920803308486938, - 0.9928614497184753, - 0.9662984609603882, - 0.30733174085617065, - 0.04957903176546097, - 0.05429871752858162, - 0.02710764855146408, - 1.030903697013855 - ] - } - } -} diff --git a/s2/provenance.json b/s2/provenance.json deleted file mode 100644 index 8ae0ff5b41dd1183a6b1ba6a402e861a9bad15ac..0000000000000000000000000000000000000000 --- a/s2/provenance.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "schema_version": 1, - "exported_utc": "2026-09-03T00:46:27.308435+00:00", - "seed": 2, - "source_checkpoint": "/flare/fusiondl_aesp/fuse_bd_model/fuse20/runs/fuse29r_s2/best_model.pt", - "source_checkpoint_sha256": "d113f84516d9e749eea611ebc53086e170a251ba50ec4f60ec69bfc5d82d92bf", - "norms_source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json", - "norms_actuator_space": "physical", - "norms_composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "onnx_opset": 17, - "exporter": "torch.onnx.export (TorchScript, dynamo=False)", - "versions": { - "torch": "2.10.0a0+git449b176", - "python": "3.12.12", - "platform": "Linux-5.14.21-150400.24.235-default-x86_64-with-glibc2.31", - "onnx": "1.22.0", - "onnxruntime": "1.29.0" - }, - "artifacts": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "b696b9c645441cde3881ff796aaec6e1927335daba4539095f6b6dee8a5768f4" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "1fc339449427dfe47ee425eb7ff500887e6a10ae1ef32d90207f2d1e3a828cf3" - } - } -} diff --git a/s3/README.md b/s3/README.md deleted file mode 100644 index 1f0a631ddbc82a5a3e7bd243593bf5f44164ef3b..0000000000000000000000000000000000000000 --- a/s3/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -license: mit -library_name: onnx -tags: - - onnx - - fusion - - plasma-physics - - tokamak - - diii-d - - mamba ---- - -# fuse29 — seed 3 - -This is seed 3, one of eight independently trained runs. Seed 0 is the champion and the default; this one exists so you can measure spread across training runs. Unless you are doing that, you want seed 0. - -29-input Mamba-2 pedestal predictor for DIII-D. Raw physical units in, -physical units out. See the [root model card](https://huggingface.co/SCS-Lab/FUSE29-Pedestal-model) -for the full description, I/O contract, accuracy and limitations. - -| | | -|---|---| -| Seed | 3 | -| Parameters | 11,254,425 | -| Best validation loss | 1.1190 | -| Sequence graph length | 256 ticks | -| ONNX opset | 17 | -| Exported | 2026-09-03T00:46:29.898835+00:00 | -| Source checkpoint SHA-256 | `ec8986c56b48bf90…` | - -## Load - -```python -from fuse29.runtime import Fuse29Predictor - -predictor = Fuse29Predictor.from_pretrained("SCS-Lab/FUSE29-Pedestal-model", seed=3) -``` - -## Files - -| File | | -|---|---| -| `fuse29_step.onnx` | one 50 ms tick, carries state, no length limit | -| `fuse29_seq.onnx` | whole shot at a fixed 256 ticks | -| `model_config.json` | I/O contract: names, order, units, sources, shapes | -| `norms.json` | the statistics baked into the graphs | -| `actuator_ranges.json` | training-split distribution, for checking your units | -| `provenance.json` | source checkpoint hash, library versions, artefact hashes | - -## Before you use it - -- Four heads (`neped_prmtan`, `teped_prmtan`, `rho_sym`, `ne_top_loc`) are - **only valid in H-mode** and the graph does not gate them. Gate on the - model's own `hmode` output. -- `pinj` is in **MW**, not W. Run `predictor.check_units(shot)` once. -- Output column order is not alphabetical. See `model_config.json`. diff --git a/s3/actuator_ranges.json b/s3/actuator_ranges.json deleted file mode 100644 index 08d19f4e80f49e6bbd18c40674b06946a02cc61a..0000000000000000000000000000000000000000 --- a/s3/actuator_ranges.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "schema_version": 1, - "note": "Physical-units distribution of each actuator over the training split. Use it to check that your signals are in the units the graph expects; a unit error is the one preprocessing mistake that produces confident nonsense rather than an exception.", - "split": "train", - "n_shots": 32731, - "n_ticks": 3020926, - "percentiles": [ - 0.1, - 1, - 5, - 25, - 50, - 75, - 95, - 99, - 99.9 - ], - "channels": { - "pinj": { - "units": "MW", - "source": "ptdata:bmspinj", - "description": "Neutral beam injected power, all sources.", - "min": -46005.02701919088, - "max": 17.512712760455507, - "mean": 3.838883638381958, - "std": 3.0613932609558105, - "pct": { - "0.1": -0.004132416388869853, - "1": 4.112187479421436e-09, - "5": 4.112187479421436e-09, - "25": 1.311169336894574, - "50": 3.18466408866965, - "75": 5.748764762873332, - "95": 9.841882532311711, - "99": 12.212702351352696, - "99.9": 14.791924355083399 - } - }, - "tinj": { - "units": "N*m", - "source": "ptdata:bmstinj", - "description": "Neutral beam injected torque, all sources.", - "min": -56.644382966354534, - "max": 129.9833380295058, - "mean": 2.2043209075927734, - "std": 2.11222505569458, - "pct": { - "0.1": -2.0636791725994676, - "1": -0.5384317586520496, - "5": -1.6338495756329507e-07, - "25": 0.4319133403840452, - "50": 1.963846077087278, - "75": 3.1821234334199193, - "95": 6.641525317445799, - "99": 8.941231792062355, - "99.9": 11.156712776956862 - } - }, - "ech_total": { - "units": "MW", - "source": "ptdata:ECHPWR", - "description": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "min": -19.31181996542309, - "max": 40.286455582885246, - "mean": 2.6981112957000732, - "std": 6.685519218444824, - "pct": { - "0.1": -1.0663586061709935, - "1": -0.09982622583332723, - "5": -0.020836448436920674, - "25": -3.2566890961760464e-08, - "50": -3.2566890961760464e-08, - "75": 1.1717011943616973, - "95": 21.558252060431304, - "99": 30.476182922859127, - "99.9": 37.09168917133024 - } - }, - "f1a": { - "units": "A", - "source": "ptdata:F1A", - "description": "Shaping F-coil F1A current (bank A).", - "min": -5776.925892871883, - "max": 5794.3504737288395, - "mean": -1382.3704833984375, - "std": 1349.629638671875, - "pct": { - "0.1": -4852.691808601986, - "1": -4131.456225748339, - "5": -3401.8604035239678, - "25": -2236.4754469921672, - "50": -1501.5458201268116, - "75": -660.4245966463927, - "95": 1294.4315819071094, - "99": 3103.250955923345, - "99.9": 4467.289606367005 - } - }, - "f2a": { - "units": "A", - "source": "ptdata:F2A", - "description": "Shaping F-coil F2A current (bank A).", - "min": -5716.347659616551, - "max": 5702.840977614059, - "mean": -1229.876708984375, - "std": 1248.3497314453125, - "pct": { - "0.1": -4093.397230708888, - "1": -3297.8668360449756, - "5": -2712.522533155646, - "25": -2004.455454331444, - "50": -1443.842241803098, - "75": -854.5004209979342, - "95": 1825.579117167513, - "99": 3097.0902901803724, - "99.9": 3899.548655232026 - } - }, - "f3a": { - "units": "A", - "source": "ptdata:F3A", - "description": "Shaping F-coil F3A current (bank A).", - "min": -5498.272347966228, - "max": 5321.719922394657, - "mean": -592.7352294921875, - "std": 1185.706298828125, - "pct": { - "0.1": -4140.690909683277, - "1": -3539.2136012211317, - "5": -2813.2888996278725, - "25": -1377.7435033975407, - "50": -152.16189816331342, - "75": 2.4453898354848604, - "95": 1203.107532773337, - "99": 2898.3184344684487, - "99.9": 3780.0556837479485 - } - }, - "f4a": { - "units": "A", - "source": "ptdata:F4A", - "description": "Shaping F-coil F4A current (bank A).", - "min": -5876.373800845117, - "max": 5855.700219305917, - "mean": 1098.1622314453125, - "std": 1368.95458984375, - "pct": { - "0.1": -4331.218505807293, - "1": -3344.4526378786877, - "5": -1858.4157962413597, - "25": 395.84891116184133, - "50": 1143.436262581068, - "75": 1990.2677717095535, - "95": 3141.5448401142426, - "99": 3756.430079500399, - "99.9": 4525.754910416766 - } - }, - "f5a": { - "units": "A", - "source": "ptdata:F5A", - "description": "Shaping F-coil F5A current (bank A).", - "min": -5178.8539079385355, - "max": 5353.141466672798, - "mean": 1173.57958984375, - "std": 1352.103759765625, - "pct": { - "0.1": -4592.7059148331355, - "1": -3597.7201189044818, - "5": -1551.4942446467403, - "25": 543.836095032849, - "50": 1273.969119983141, - "75": 2051.0443148459794, - "95": 3019.669622905384, - "99": 3875.454685744494, - "99.9": 4738.506855960392 - } - }, - "f6a": { - "units": "A", - "source": "ptdata:F6A", - "description": "Shaping F-coil F6A current (bank A).", - "min": -7929.903731492232, - "max": 5741.056818467809, - "mean": -2493.411865234375, - "std": 1867.8076171875, - "pct": { - "0.1": -6125.90268588119, - "1": -4963.398523516425, - "5": -4319.477588996284, - "25": -3574.8234234024885, - "50": -2898.635802832382, - "75": -2143.0930801744807, - "95": 2999.75903843203, - "99": 4137.6543157735705, - "99.9": 4783.375582166487 - } - }, - "f7a": { - "units": "A", - "source": "ptdata:F7A", - "description": "Shaping F-coil F7A current (bank A).", - "min": -9825.736080045011, - "max": 8678.484606762057, - "mean": -2367.570556640625, - "std": 1999.19970703125, - "pct": { - "0.1": -7676.219824168618, - "1": -6127.379912259545, - "5": -4909.893927511103, - "25": -3430.1309476786882, - "50": -2697.460342263373, - "75": -1913.0579478721388, - "95": 2723.164038733837, - "99": 3948.221013655396, - "99.9": 5316.086800760559 - } - }, - "f8a": { - "units": "A", - "source": "ptdata:F8A", - "description": "Shaping F-coil F8A current (bank A).", - "min": -5378.835169240788, - "max": 5880.767402237174, - "mean": 996.0214233398438, - "std": 1498.948974609375, - "pct": { - "0.1": -4229.744640827867, - "1": -3363.368412210415, - "5": -1922.2114690963926, - "25": 60.761390529545906, - "50": 1153.9241798399726, - "75": 1951.1572686642544, - "95": 3318.078493605748, - "99": 3973.7764489149104, - "99.9": 4670.296725684707 - } - }, - "f9a": { - "units": "A", - "source": "ptdata:F9A", - "description": "Shaping F-coil F9A current (bank A).", - "min": -7206.032812499594, - "max": 8700.684616308497, - "mean": -535.8018798828125, - "std": 1258.01171875, - "pct": { - "0.1": -4739.927394914494, - "1": -3344.557163847978, - "5": -2567.420669960383, - "25": -1538.6304412830955, - "50": -578.9736547563273, - "75": 353.08467764596537, - "95": 1558.2607279613098, - "99": 2657.691791383836, - "99.9": 4334.930796170508 - } - }, - "f1b": { - "units": "A", - "source": "ptdata:F1B", - "description": "Shaping F-coil F1B current (bank B).", - "min": -5921.943154546981, - "max": 5407.326196618229, - "mean": -1373.1888427734375, - "std": 1367.82275390625, - "pct": { - "0.1": -5179.567735964654, - "1": -4339.478258925401, - "5": -3463.431883510691, - "25": -2205.922070942479, - "50": -1459.5306304510002, - "75": -750.1948036110768, - "95": 1428.796834935177, - "99": 3233.0438718527407, - "99.9": 4240.724502122051 - } - }, - "f2b": { - "units": "A", - "source": "ptdata:F2B", - "description": "Shaping F-coil F2B current (bank B).", - "min": -5788.286812358208, - "max": 5428.562849130928, - "mean": -1218.50048828125, - "std": 1316.67724609375, - "pct": { - "0.1": -4785.998935671587, - "1": -3520.521383204173, - "5": -2855.1671089762676, - "25": -1969.483606794242, - "50": -1447.1879016413761, - "75": -866.6265611311096, - "95": 2049.217650390811, - "99": 3312.4349928765846, - "99.9": 4011.5142868858347 - } - }, - "f3b": { - "units": "A", - "source": "ptdata:F3B", - "description": "Shaping F-coil F3B current (bank B).", - "min": -5503.943071765381, - "max": 4849.177948074737, - "mean": -1005.3848266601562, - "std": 1308.8258056640625, - "pct": { - "0.1": -4452.6277480541985, - "1": -3641.634707712471, - "5": -2937.4861003450947, - "25": -1881.7475544966392, - "50": -1170.6945714968547, - "75": -124.13671681902403, - "95": 1683.5400540223286, - "99": 3015.8060365193123, - "99.9": 3797.6599244161957 - } - }, - "f4b": { - "units": "A", - "source": "ptdata:F4B", - "description": "Shaping F-coil F4B current (bank B).", - "min": -5829.242194941551, - "max": 5787.149431930685, - "mean": 1124.2967529296875, - "std": 1519.5994873046875, - "pct": { - "0.1": -4083.976449898858, - "1": -3247.08251902718, - "5": -2270.942268479742, - "25": 376.8608226937906, - "50": 1392.450441038166, - "75": 2146.7001303629104, - "95": 3145.5476189867913, - "99": 3926.614817946318, - "99.9": 4582.551950710075 - } - }, - "f5b": { - "units": "A", - "source": "ptdata:F5B", - "description": "Shaping F-coil F5B current (bank B).", - "min": -5213.110339059254, - "max": 5388.213772287713, - "mean": 1443.536865234375, - "std": 1408.3306884765625, - "pct": { - "0.1": -4134.61747806435, - "1": -3056.873937432705, - "5": -1361.0988601293998, - "25": 675.1515533174199, - "50": 1572.802070225599, - "75": 2367.5452263604984, - "95": 3528.863240540377, - "99": 4411.454242162536, - "99.9": 4967.30642206674 - } - }, - "f6b": { - "units": "A", - "source": "ptdata:F6B", - "description": "Shaping F-coil F6B current (bank B).", - "min": -7604.653108484432, - "max": 7763.1261416792295, - "mean": -2463.248046875, - "std": 1836.4208984375, - "pct": { - "0.1": -6372.627428710043, - "1": -5251.4106280007745, - "5": -4318.157196234368, - "25": -3524.5849152058445, - "50": -2837.2759930056304, - "75": -2089.94465303326, - "95": 2871.6849973390945, - "99": 3948.010461650111, - "99.9": 4803.251616324593 - } - }, - "f7b": { - "units": "A", - "source": "ptdata:F7B", - "description": "Shaping F-coil F7B current (bank B).", - "min": -11380.254539563213, - "max": 9414.242772782009, - "mean": -2941.56005859375, - "std": 2510.1083984375, - "pct": { - "0.1": -9236.286164628174, - "1": -7962.01372128499, - "5": -6618.689743738845, - "25": -4397.68407591947, - "50": -3041.7944101983817, - "75": -2113.0768216001165, - "95": 2850.240503964187, - "99": 5238.131223534479, - "99.9": 6771.41582857779 - } - }, - "f8b": { - "units": "A", - "source": "ptdata:F8B", - "description": "Shaping F-coil F8B current (bank B).", - "min": -5834.457886045129, - "max": 5952.292180058913, - "mean": 1431.05615234375, - "std": 1718.2965087890625, - "pct": { - "0.1": -4377.886849186064, - "1": -3547.8568327724756, - "5": -2536.325388000092, - "25": 592.1441487378677, - "50": 1743.1741236182588, - "75": 2613.9050347435855, - "95": 3655.019608301406, - "99": 4295.252919476556, - "99.9": 5183.621783504976 - } - }, - "f9b": { - "units": "A", - "source": "ptdata:F9B", - "description": "Shaping F-coil F9B current (bank B).", - "min": -7298.33418485197, - "max": 8673.475372842513, - "mean": -214.02586364746094, - "std": 1388.83447265625, - "pct": { - "0.1": -4443.002941036773, - "1": -3335.961239603393, - "5": -2530.3434455144015, - "25": -1111.6205754278508, - "50": -212.41719832099042, - "75": 564.1401009862525, - "95": 2296.158459733251, - "99": 3401.023805016151, - "99.9": 4981.695296538042 - } - }, - "ecoila": { - "units": "A", - "source": "ptdata:ECOILA", - "description": "Ohmic E-coil bank A current.", - "min": -68526.67779690563, - "max": 65669.33446503483, - "mean": -6965.32666015625, - "std": 18940.9453125, - "pct": { - "0.1": -62521.0592220894, - "1": -53449.0677376177, - "5": -39610.65329064206, - "25": -19599.348704727538, - "50": -6887.604056684089, - "75": 6065.040591650557, - "95": 23926.96154448237, - "99": 33650.27142286909, - "99.9": 48164.54971213867 - } - }, - "ecoilb": { - "units": "A", - "source": "ptdata:ECOILB", - "description": "Ohmic E-coil bank B current.", - "min": -67880.78461590248, - "max": 67380.80764904841, - "mean": -6876.16455078125, - "std": 18723.662109375, - "pct": { - "0.1": -61839.528701402356, - "1": -52787.079189397904, - "5": -39153.2527665565, - "25": -19383.82435886666, - "50": -6768.996463787789, - "75": 6013.297288247475, - "95": 23686.641557508636, - "99": 33187.653018934754, - "99.9": 47362.43837391052 - } - }, - "gasa_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "description": "Calibrated gas injection flow, valve A.", - "min": -0.9805486760911233, - "max": 348.1779045740827, - "mean": 15.054444313049316, - "std": 26.369497299194336, - "pct": { - "0.1": -0.0181447514768128, - "1": 0.0006228885411054819, - "5": 0.0014589414841879034, - "25": 0.00852798057103854, - "50": 0.09974314587981326, - "75": 19.645558552678416, - "95": 71.02669389337856, - "99": 137.36341388263276, - "99.9": 211.79616738152396 - } - }, - "gasb_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "description": "Calibrated gas injection flow, valve B.", - "min": -0.5231055139632899, - "max": 317.69717326145866, - "mean": 1.386172890663147, - "std": 3.4090511798858643, - "pct": { - "0.1": 9.14047308575583e-06, - "1": 0.0007714573310613204, - "5": 0.002068321612864521, - "25": 0.009055124211873267, - "50": 0.07339015461169385, - "75": 1.9421402622606716, - "95": 1.9421402622606716, - "99": 23.663863921838843, - "99.9": 149.40068998150738 - } - }, - "gasc_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "description": "Calibrated gas injection flow, valve C.", - "min": -0.3965804467767108, - "max": 306.0269668007428, - "mean": 0.35034820437431335, - "std": 0.4470684826374054, - "pct": { - "0.1": 7.428448363699935e-05, - "1": 0.00026770734685732656, - "5": 0.0006667805693404416, - "25": 0.002788385500787083, - "50": 0.023577950502740697, - "75": 0.7508911827356307, - "95": 0.7508911827356307, - "99": 2.733332630282, - "99.9": 108.67323889612304 - } - }, - "gasd_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "description": "Calibrated gas injection flow, valve D.", - "min": -0.5287260135880842, - "max": 771.5043798529183, - "mean": 0.528103232383728, - "std": 0.654624342918396, - "pct": { - "0.1": 5.497087182604332e-05, - "1": 0.000175335120693898, - "5": 0.0005482846440516553, - "25": 0.003719433481388368, - "50": 0.08385269566973214, - "75": 1.0383906373403984, - "95": 1.0383906373403984, - "99": 4.359676988215197, - "99.9": 127.54440071212512 - } - }, - "gase_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "description": "Calibrated gas injection flow, valve E.", - "min": -0.2211384331710633, - "max": 672.8582070151267, - "mean": 0.27696067094802856, - "std": 0.17616958916187286, - "pct": { - "0.1": 0.00010156410138473793, - "1": 0.000223585566083373, - "5": 0.0005190716405260032, - "25": 0.011627604901727706, - "50": 0.3920832239686922, - "75": 0.3920832239686922, - "95": 0.3920832239686922, - "99": 0.3920832239686922, - "99.9": 29.75536079519976 - } - }, - "bt": { - "units": "T", - "source": "ptdata:bt", - "description": "Vacuum toroidal magnetic field (signed).", - "min": -2.2353815075115375, - "max": 2.25186423641397, - "mean": -0.971906840801239, - "std": 1.6484158039093018, - "pct": { - "0.1": -2.2151064134142304, - "1": -2.1819873443702726, - "5": -2.136304350652244, - "25": -2.0446028795017246, - "50": -1.8984274308309796, - "75": -1.0260122281948352, - "95": 2.053318112027725, - "99": 2.10945640328767, - "99.9": 2.1819705410137904 - } - } - } -} diff --git a/s3/fuse29_seq.onnx b/s3/fuse29_seq.onnx deleted file mode 100644 index 405c83cab0c1d658c5810bd8694e8a0749fddf99..0000000000000000000000000000000000000000 --- a/s3/fuse29_seq.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab580c091de0471edc8454085dcda9c88650e4995be5c2ec6bd7f8b1c87d7786 -size 45464382 diff --git a/s3/fuse29_step.onnx b/s3/fuse29_step.onnx deleted file mode 100644 index 513604f9f04cb3d9af464a8112467c87ea61c636..0000000000000000000000000000000000000000 --- a/s3/fuse29_step.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2b80d7f732cef7a21eb21e606cf4a3e63aa4a91a9ff6dde789d88e07fcd5418 -size 45081271 diff --git a/s3/model_config.json b/s3/model_config.json deleted file mode 100644 index 499f772083fc3c0ed62b2a217c705c89429891ac..0000000000000000000000000000000000000000 --- a/s3/model_config.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "schema_version": 1, - "model": "fuse29", - "seed": 3, - "description": "29-input Mamba-2 pedestal predictor for DIII-D. Strictly causal, 20 Hz, nine heads at rho_tor = 0.85.", - "architecture": { - "family": "Mamba-2 (structured state-space duality)", - "d_model": 512, - "n_layers": 6, - "d_state": 128, - "d_conv": 4, - "expand": 2, - "headdim": 128, - "nheads": 8, - "ngroups": 2, - "chunk_size": 100, - "d_inner": 1024, - "conv_dim": 1536, - "n_params": 11254425 - }, - "cadence": { - "hz": 20, - "period_ms": 50.0, - "rho_tor": 0.85 - }, - "inputs": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "n": 29, - "units": { - "pinj": "MW", - "tinj": "N*m", - "ech_total": "MW", - "f1a": "A", - "f2a": "A", - "f3a": "A", - "f4a": "A", - "f5a": "A", - "f6a": "A", - "f7a": "A", - "f8a": "A", - "f9a": "A", - "f1b": "A", - "f2b": "A", - "f3b": "A", - "f4b": "A", - "f5b": "A", - "f6b": "A", - "f7b": "A", - "f8b": "A", - "f9b": "A", - "ecoila": "A", - "ecoilb": "A", - "gasa_cal": "Torr*L/s", - "gasb_cal": "Torr*L/s", - "gasc_cal": "Torr*L/s", - "gasd_cal": "Torr*L/s", - "gase_cal": "Torr*L/s", - "bt": "T" - }, - "sources": { - "pinj": "ptdata:bmspinj", - "tinj": "ptdata:bmstinj", - "ech_total": "ptdata:ECHPWR", - "f1a": "ptdata:F1A", - "f2a": "ptdata:F2A", - "f3a": "ptdata:F3A", - "f4a": "ptdata:F4A", - "f5a": "ptdata:F5A", - "f6a": "ptdata:F6A", - "f7a": "ptdata:F7A", - "f8a": "ptdata:F8A", - "f9a": "ptdata:F9A", - "f1b": "ptdata:F1B", - "f2b": "ptdata:F2B", - "f3b": "ptdata:F3B", - "f4b": "ptdata:F4B", - "f5b": "ptdata:F5B", - "f6b": "ptdata:F6B", - "f7b": "ptdata:F7B", - "f8b": "ptdata:F8B", - "f9b": "ptdata:F9B", - "ecoila": "ptdata:ECOILA", - "ecoilb": "ptdata:ECOILB", - "gasa_cal": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "gasb_cal": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "gasc_cal": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "gasd_cal": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "gase_cal": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "bt": "ptdata:bt" - }, - "descriptions": { - "pinj": "Neutral beam injected power, all sources.", - "tinj": "Neutral beam injected torque, all sources.", - "ech_total": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "f1a": "Shaping F-coil F1A current (bank A).", - "f2a": "Shaping F-coil F2A current (bank A).", - "f3a": "Shaping F-coil F3A current (bank A).", - "f4a": "Shaping F-coil F4A current (bank A).", - "f5a": "Shaping F-coil F5A current (bank A).", - "f6a": "Shaping F-coil F6A current (bank A).", - "f7a": "Shaping F-coil F7A current (bank A).", - "f8a": "Shaping F-coil F8A current (bank A).", - "f9a": "Shaping F-coil F9A current (bank A).", - "f1b": "Shaping F-coil F1B current (bank B).", - "f2b": "Shaping F-coil F2B current (bank B).", - "f3b": "Shaping F-coil F3B current (bank B).", - "f4b": "Shaping F-coil F4B current (bank B).", - "f5b": "Shaping F-coil F5B current (bank B).", - "f6b": "Shaping F-coil F6B current (bank B).", - "f7b": "Shaping F-coil F7B current (bank B).", - "f8b": "Shaping F-coil F8B current (bank B).", - "f9b": "Shaping F-coil F9B current (bank B).", - "ecoila": "Ohmic E-coil bank A current.", - "ecoilb": "Ohmic E-coil bank B current.", - "gasa_cal": "Calibrated gas injection flow, valve A.", - "gasb_cal": "Calibrated gas injection flow, valve B.", - "gasc_cal": "Calibrated gas injection flow, valve C.", - "gasd_cal": "Calibrated gas injection flow, valve D.", - "gase_cal": "Calibrated gas injection flow, valve E.", - "bt": "Vacuum toroidal magnetic field (signed)." - }, - "space": "raw physical units; the graph applies the z-score", - "note": "Check your units against actuator_ranges.json before trusting any output. A unit error produces confident nonsense rather than an exception." - }, - "outputs": { - "names": [ - "ne", - "te_ped", - "ti_ped", - "t_rot_ped", - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc", - "hmode" - ], - "n": 9, - "units": { - "ne": "1e19 m^-3", - "te_ped": "keV", - "ti_ped": "keV", - "t_rot_ped": "krad/s", - "neped_prmtan": "1e19 m^-3", - "teped_prmtan": "keV", - "rho_sym": "rho_tor (dimensionless)", - "ne_top_loc": "rho_tor (dimensionless)", - "hmode": "probability in [0, 1]" - }, - "note": "Physical units. hmode is a probability in [0, 1]; the graph applies the sigmoid.", - "hmode_gated": { - "heads": [ - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc" - ], - "indices": [ - 4, - 5, - 6, - 7 - ], - "threshold": 0.5, - "note": "These four heads were trained only on H-mode rows and are undefined otherwise. The graph does NOT gate them; the consumer must, using the model's own hmode output. See docs/GATING.md." - } - }, - "graphs": { - "fuse29_step.onnx": { - "purpose": "real-time, one 50 ms tick per call", - "inputs": { - "actuators": [ - "batch", - 29 - ], - "conv_state": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "outputs": { - "predictions": [ - "batch", - 9 - ], - "conv_state_out": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state_out": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "initial_state": "all zeros at the start of a shot", - "max_shot_length": "unbounded" - }, - "fuse29_seq.onnx": { - "purpose": "offline scoring of a whole shot", - "inputs": { - "actuators": [ - "batch", - 256, - 29 - ] - }, - "outputs": { - "predictions": [ - "batch", - 256, - 9 - ] - }, - "seq_len": 256, - "note": "Sequence length is FIXED. Right-pad shorter shots with zeros and read the first T outputs; the model is strictly causal so this is exact. For longer shots use the step graph or re-export with --seq-len." - } - }, - "dtype": "float32", - "onnx_opset": 17, - "training": { - "epoch": 20, - "val_loss": 1.1190400626510382, - "note": "See docs/TRAINING.md for the full recipe." - } -} diff --git a/s3/norms.json b/s3/norms.json deleted file mode 100644 index 98c8c06209fd050ed78c21fa5b30afd95a71c171..0000000000000000000000000000000000000000 --- a/s3/norms.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "schema_version": 2, - "note": "Statistics are baked into the shipped ONNX graphs. This file is for inspection and for reproducing the transform outside the graph; it is not required at inference time.", - "actuator_space": "physical", - "std_floor": 1e-06, - "clip_sigma": 20.0, - "provenance": { - "split": "train", - "n_shots": 32731, - "rho_index": 85, - "source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85, random stratified split (split_index.json)", - "note": "Recomputed on the NEW random train split. The source shards carried z-scores from the OLD chronological train split, whose shots overlap our test set. Actuator statistics are winsorised so a corrupted sample cannot set a channel's divisor.", - "inflated_channels": [ - "pinj", - "gasc_cal", - "gasd_cal", - "gase_cal" - ], - "actuator_estimator": "winsorised to p1..p99", - "actuator_space": "physical", - "composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "composition": "z = (x_phys - (m1 + s1*m2)) / (s1*s2), where (m1, s1) is the upstream FPE z-score and (m2, s2) is this model's re-scale onto its own training split" - }, - "actuators": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "mean": [ - 3.838883638381958, - 2.2043209075927734, - 2.6981112957000732, - -1382.3704833984375, - -1229.876708984375, - -592.7352294921875, - 1098.1622314453125, - 1173.57958984375, - -2493.411865234375, - -2367.570556640625, - 996.0214233398438, - -535.8018798828125, - -1373.1888427734375, - -1218.50048828125, - -1005.3848266601562, - 1124.2967529296875, - 1443.536865234375, - -2463.248046875, - -2941.56005859375, - 1431.05615234375, - -214.02586364746094, - -6965.32666015625, - -6876.16455078125, - 15.054444313049316, - 1.386172890663147, - 0.35034820437431335, - 0.528103232383728, - 0.27696067094802856, - -0.971906840801239 - ], - "std": [ - 3.0613932609558105, - 2.11222505569458, - 6.685519218444824, - 1349.629638671875, - 1248.3497314453125, - 1185.706298828125, - 1368.95458984375, - 1352.103759765625, - 1867.8076171875, - 1999.19970703125, - 1498.948974609375, - 1258.01171875, - 1367.82275390625, - 1316.67724609375, - 1308.8258056640625, - 1519.5994873046875, - 1408.3306884765625, - 1836.4208984375, - 2510.1083984375, - 1718.2965087890625, - 1388.83447265625, - 18940.9453125, - 18723.662109375, - 26.369497299194336, - 3.4090511798858643, - 0.4470684826374054, - 0.654624342918396, - 0.17616958916187286, - 1.6484158039093018 - ], - "transform": "z = clip((x - mean) / std, -clip_sigma, +clip_sigma), applied inside the graph" - }, - "targets": { - "ne": { - "mean": 2.7511744499206543, - "std": 1.654153823852539 - }, - "te_ped": { - "mean": 0.5915626287460327, - "std": 0.43467429280281067 - }, - "ti_ped": { - "mean": 1.016850233078003, - "std": 0.681096076965332 - }, - "t_rot_ped": { - "mean": 21.244613647460938, - "std": 16.59148406982422 - }, - "neped_prmtan": { - "mean": 2.7231285572052, - "std": 1.7005536556243896 - }, - "teped_prmtan": { - "mean": 0.46375223994255066, - "std": 0.36919456720352173 - }, - "rho_sym": { - "mean": 0.9757616519927979, - "std": 0.04329206794500351 - }, - "ne_top_loc": { - "mean": 0.9261865019798279, - "std": 0.049897171556949615 - } - }, - "hmode": { - "transform": "sigmoid", - "note": "hmode is a logit in the trunk; the graph applies the sigmoid." - }, - "stages": { - "note": "The composed actuator statistics above are the product of these two. Shown for traceability; use the composed values.", - "stage1_physical_to_fpe_zscore": { - "mean": [ - 2.8111997039100878, - 2.154143940948575, - 2.159654935239209, - -1444.0438445123289, - -1315.1185221229061, - -639.741760304047, - 1172.4978680515835, - 1222.4970107268077, - -2488.8410961768263, - -2491.3739557685253, - 1050.107386405324, - -578.9736547563273, - -1421.0817159358041, - -1285.3967398730092, - -1061.0290851406676, - 1186.4795970820587, - 1460.6822372728345, - -2452.093120847959, - -3071.3132492215186, - 1531.3304960724108, - -262.6728625067526, - -6887.604056684089, - -6768.996463787789, - 14.89178144369171, - 1.9421402622606716, - 0.7508911827356307, - 1.0383906373403984, - 0.3920832239686922, - -1.0310375752078498 - ], - "std": [ - 194.08418888726106, - 2.3684465859740262, - 5.948083564785035, - 1267.4907621702682, - 1217.4478106828162, - 1249.3915272640536, - 1345.3871181128568, - 1359.1934832307923, - 1887.1891497052302, - 1888.1014577442652, - 1559.9875106371376, - 1287.2118470203372, - 1271.813282654729, - 1259.8644805335082, - 1361.9306367877398, - 1521.172083160852, - 1393.2120473032558, - 1856.723912629122, - 2432.8530409799628, - 1705.6959050005082, - 1421.8036451037203, - 19092.148992270486, - 18858.28389193975, - 27.289184462156058, - 11.092415079529571, - 9.017289768908354, - 12.055982101097918, - 6.498888909025979, - 1.599000778986496 - ] - }, - "stage2_fpe_zscore_to_model": { - "mean": [ - 0.0052950419485569, - 0.02118559367954731, - 0.0905260294675827, - 0.04865782707929611, - 0.0700167864561081, - 0.03762352466583252, - -0.05525219440460205, - -0.03599006310105324, - -0.002421961398795247, - 0.06557027250528336, - -0.03467077016830444, - 0.03353898227214813, - 0.03765711933374405, - 0.05309795215725899, - 0.040856875479221344, - -0.04087827727198601, - -0.012306398712098598, - -0.006007813848555088, - 0.05333370715379715, - -0.05878793075680733, - 0.03421499580144882, - -0.004070908762514591, - -0.00568280229344964, - 0.005960696842521429, - -0.050121404230594635, - -0.04441944137215614, - -0.042326491326093674, - -0.017714189365506172, - 0.036979787051677704 - ], - "std": [ - 0.015773532912135124, - 0.8918187022209167, - 1.1239787340164185, - 1.0648043155670166, - 1.0253825187683105, - 0.9490270018577576, - 1.0175172090530396, - 0.994783878326416, - 0.9897299408912659, - 1.0588412284851074, - 0.9608724117279053, - 0.9773152470588684, - 1.0754902362823486, - 1.04509437084198, - 0.9610077142715454, - 0.9989661574363708, - 1.0108516216278076, - 0.9890651702880859, - 1.0317550897598267, - 1.007387399673462, - 0.9768117070198059, - 0.9920803308486938, - 0.9928614497184753, - 0.9662984609603882, - 0.30733174085617065, - 0.04957903176546097, - 0.05429871752858162, - 0.02710764855146408, - 1.030903697013855 - ] - } - } -} diff --git a/s3/provenance.json b/s3/provenance.json deleted file mode 100644 index 1f3fa7dae0b4a600847f084bdf5e04604639885e..0000000000000000000000000000000000000000 --- a/s3/provenance.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "schema_version": 1, - "exported_utc": "2026-09-03T00:46:29.898835+00:00", - "seed": 3, - "source_checkpoint": "/flare/fusiondl_aesp/fuse_bd_model/fuse20/runs/fuse29r_s3/best_model.pt", - "source_checkpoint_sha256": "ec8986c56b48bf90ca14a2312d6024ad1541bb04baa64889e54d104ae914b914", - "norms_source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json", - "norms_actuator_space": "physical", - "norms_composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "onnx_opset": 17, - "exporter": "torch.onnx.export (TorchScript, dynamo=False)", - "versions": { - "torch": "2.10.0a0+git449b176", - "python": "3.12.12", - "platform": "Linux-5.14.21-150400.24.235-default-x86_64-with-glibc2.31", - "onnx": "1.22.0", - "onnxruntime": "1.29.0" - }, - "artifacts": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "f2b80d7f732cef7a21eb21e606cf4a3e63aa4a91a9ff6dde789d88e07fcd5418" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "ab580c091de0471edc8454085dcda9c88650e4995be5c2ec6bd7f8b1c87d7786" - } - } -} diff --git a/s4/README.md b/s4/README.md deleted file mode 100644 index 6035dc25f8782bbd46dc554559a058885a15d67c..0000000000000000000000000000000000000000 --- a/s4/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -license: mit -library_name: onnx -tags: - - onnx - - fusion - - plasma-physics - - tokamak - - diii-d - - mamba ---- - -# fuse29 — seed 4 - -This is seed 4, one of eight independently trained runs. Seed 0 is the champion and the default; this one exists so you can measure spread across training runs. Unless you are doing that, you want seed 0. - -29-input Mamba-2 pedestal predictor for DIII-D. Raw physical units in, -physical units out. See the [root model card](https://huggingface.co/SCS-Lab/FUSE29-Pedestal-model) -for the full description, I/O contract, accuracy and limitations. - -| | | -|---|---| -| Seed | 4 | -| Parameters | 11,254,425 | -| Best validation loss | 1.1321 | -| Sequence graph length | 256 ticks | -| ONNX opset | 17 | -| Exported | 2026-09-03T00:46:32.537210+00:00 | -| Source checkpoint SHA-256 | `d36f1364948aded5…` | - -## Load - -```python -from fuse29.runtime import Fuse29Predictor - -predictor = Fuse29Predictor.from_pretrained("SCS-Lab/FUSE29-Pedestal-model", seed=4) -``` - -## Files - -| File | | -|---|---| -| `fuse29_step.onnx` | one 50 ms tick, carries state, no length limit | -| `fuse29_seq.onnx` | whole shot at a fixed 256 ticks | -| `model_config.json` | I/O contract: names, order, units, sources, shapes | -| `norms.json` | the statistics baked into the graphs | -| `actuator_ranges.json` | training-split distribution, for checking your units | -| `provenance.json` | source checkpoint hash, library versions, artefact hashes | - -## Before you use it - -- Four heads (`neped_prmtan`, `teped_prmtan`, `rho_sym`, `ne_top_loc`) are - **only valid in H-mode** and the graph does not gate them. Gate on the - model's own `hmode` output. -- `pinj` is in **MW**, not W. Run `predictor.check_units(shot)` once. -- Output column order is not alphabetical. See `model_config.json`. diff --git a/s4/actuator_ranges.json b/s4/actuator_ranges.json deleted file mode 100644 index 08d19f4e80f49e6bbd18c40674b06946a02cc61a..0000000000000000000000000000000000000000 --- a/s4/actuator_ranges.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "schema_version": 1, - "note": "Physical-units distribution of each actuator over the training split. Use it to check that your signals are in the units the graph expects; a unit error is the one preprocessing mistake that produces confident nonsense rather than an exception.", - "split": "train", - "n_shots": 32731, - "n_ticks": 3020926, - "percentiles": [ - 0.1, - 1, - 5, - 25, - 50, - 75, - 95, - 99, - 99.9 - ], - "channels": { - "pinj": { - "units": "MW", - "source": "ptdata:bmspinj", - "description": "Neutral beam injected power, all sources.", - "min": -46005.02701919088, - "max": 17.512712760455507, - "mean": 3.838883638381958, - "std": 3.0613932609558105, - "pct": { - "0.1": -0.004132416388869853, - "1": 4.112187479421436e-09, - "5": 4.112187479421436e-09, - "25": 1.311169336894574, - "50": 3.18466408866965, - "75": 5.748764762873332, - "95": 9.841882532311711, - "99": 12.212702351352696, - "99.9": 14.791924355083399 - } - }, - "tinj": { - "units": "N*m", - "source": "ptdata:bmstinj", - "description": "Neutral beam injected torque, all sources.", - "min": -56.644382966354534, - "max": 129.9833380295058, - "mean": 2.2043209075927734, - "std": 2.11222505569458, - "pct": { - "0.1": -2.0636791725994676, - "1": -0.5384317586520496, - "5": -1.6338495756329507e-07, - "25": 0.4319133403840452, - "50": 1.963846077087278, - "75": 3.1821234334199193, - "95": 6.641525317445799, - "99": 8.941231792062355, - "99.9": 11.156712776956862 - } - }, - "ech_total": { - "units": "MW", - "source": "ptdata:ECHPWR", - "description": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "min": -19.31181996542309, - "max": 40.286455582885246, - "mean": 2.6981112957000732, - "std": 6.685519218444824, - "pct": { - "0.1": -1.0663586061709935, - "1": -0.09982622583332723, - "5": -0.020836448436920674, - "25": -3.2566890961760464e-08, - "50": -3.2566890961760464e-08, - "75": 1.1717011943616973, - "95": 21.558252060431304, - "99": 30.476182922859127, - "99.9": 37.09168917133024 - } - }, - "f1a": { - "units": "A", - "source": "ptdata:F1A", - "description": "Shaping F-coil F1A current (bank A).", - "min": -5776.925892871883, - "max": 5794.3504737288395, - "mean": -1382.3704833984375, - "std": 1349.629638671875, - "pct": { - "0.1": -4852.691808601986, - "1": -4131.456225748339, - "5": -3401.8604035239678, - "25": -2236.4754469921672, - "50": -1501.5458201268116, - "75": -660.4245966463927, - "95": 1294.4315819071094, - "99": 3103.250955923345, - "99.9": 4467.289606367005 - } - }, - "f2a": { - "units": "A", - "source": "ptdata:F2A", - "description": "Shaping F-coil F2A current (bank A).", - "min": -5716.347659616551, - "max": 5702.840977614059, - "mean": -1229.876708984375, - "std": 1248.3497314453125, - "pct": { - "0.1": -4093.397230708888, - "1": -3297.8668360449756, - "5": -2712.522533155646, - "25": -2004.455454331444, - "50": -1443.842241803098, - "75": -854.5004209979342, - "95": 1825.579117167513, - "99": 3097.0902901803724, - "99.9": 3899.548655232026 - } - }, - "f3a": { - "units": "A", - "source": "ptdata:F3A", - "description": "Shaping F-coil F3A current (bank A).", - "min": -5498.272347966228, - "max": 5321.719922394657, - "mean": -592.7352294921875, - "std": 1185.706298828125, - "pct": { - "0.1": -4140.690909683277, - "1": -3539.2136012211317, - "5": -2813.2888996278725, - "25": -1377.7435033975407, - "50": -152.16189816331342, - "75": 2.4453898354848604, - "95": 1203.107532773337, - "99": 2898.3184344684487, - "99.9": 3780.0556837479485 - } - }, - "f4a": { - "units": "A", - "source": "ptdata:F4A", - "description": "Shaping F-coil F4A current (bank A).", - "min": -5876.373800845117, - "max": 5855.700219305917, - "mean": 1098.1622314453125, - "std": 1368.95458984375, - "pct": { - "0.1": -4331.218505807293, - "1": -3344.4526378786877, - "5": -1858.4157962413597, - "25": 395.84891116184133, - "50": 1143.436262581068, - "75": 1990.2677717095535, - "95": 3141.5448401142426, - "99": 3756.430079500399, - "99.9": 4525.754910416766 - } - }, - "f5a": { - "units": "A", - "source": "ptdata:F5A", - "description": "Shaping F-coil F5A current (bank A).", - "min": -5178.8539079385355, - "max": 5353.141466672798, - "mean": 1173.57958984375, - "std": 1352.103759765625, - "pct": { - "0.1": -4592.7059148331355, - "1": -3597.7201189044818, - "5": -1551.4942446467403, - "25": 543.836095032849, - "50": 1273.969119983141, - "75": 2051.0443148459794, - "95": 3019.669622905384, - "99": 3875.454685744494, - "99.9": 4738.506855960392 - } - }, - "f6a": { - "units": "A", - "source": "ptdata:F6A", - "description": "Shaping F-coil F6A current (bank A).", - "min": -7929.903731492232, - "max": 5741.056818467809, - "mean": -2493.411865234375, - "std": 1867.8076171875, - "pct": { - "0.1": -6125.90268588119, - "1": -4963.398523516425, - "5": -4319.477588996284, - "25": -3574.8234234024885, - "50": -2898.635802832382, - "75": -2143.0930801744807, - "95": 2999.75903843203, - "99": 4137.6543157735705, - "99.9": 4783.375582166487 - } - }, - "f7a": { - "units": "A", - "source": "ptdata:F7A", - "description": "Shaping F-coil F7A current (bank A).", - "min": -9825.736080045011, - "max": 8678.484606762057, - "mean": -2367.570556640625, - "std": 1999.19970703125, - "pct": { - "0.1": -7676.219824168618, - "1": -6127.379912259545, - "5": -4909.893927511103, - "25": -3430.1309476786882, - "50": -2697.460342263373, - "75": -1913.0579478721388, - "95": 2723.164038733837, - "99": 3948.221013655396, - "99.9": 5316.086800760559 - } - }, - "f8a": { - "units": "A", - "source": "ptdata:F8A", - "description": "Shaping F-coil F8A current (bank A).", - "min": -5378.835169240788, - "max": 5880.767402237174, - "mean": 996.0214233398438, - "std": 1498.948974609375, - "pct": { - "0.1": -4229.744640827867, - "1": -3363.368412210415, - "5": -1922.2114690963926, - "25": 60.761390529545906, - "50": 1153.9241798399726, - "75": 1951.1572686642544, - "95": 3318.078493605748, - "99": 3973.7764489149104, - "99.9": 4670.296725684707 - } - }, - "f9a": { - "units": "A", - "source": "ptdata:F9A", - "description": "Shaping F-coil F9A current (bank A).", - "min": -7206.032812499594, - "max": 8700.684616308497, - "mean": -535.8018798828125, - "std": 1258.01171875, - "pct": { - "0.1": -4739.927394914494, - "1": -3344.557163847978, - "5": -2567.420669960383, - "25": -1538.6304412830955, - "50": -578.9736547563273, - "75": 353.08467764596537, - "95": 1558.2607279613098, - "99": 2657.691791383836, - "99.9": 4334.930796170508 - } - }, - "f1b": { - "units": "A", - "source": "ptdata:F1B", - "description": "Shaping F-coil F1B current (bank B).", - "min": -5921.943154546981, - "max": 5407.326196618229, - "mean": -1373.1888427734375, - "std": 1367.82275390625, - "pct": { - "0.1": -5179.567735964654, - "1": -4339.478258925401, - "5": -3463.431883510691, - "25": -2205.922070942479, - "50": -1459.5306304510002, - "75": -750.1948036110768, - "95": 1428.796834935177, - "99": 3233.0438718527407, - "99.9": 4240.724502122051 - } - }, - "f2b": { - "units": "A", - "source": "ptdata:F2B", - "description": "Shaping F-coil F2B current (bank B).", - "min": -5788.286812358208, - "max": 5428.562849130928, - "mean": -1218.50048828125, - "std": 1316.67724609375, - "pct": { - "0.1": -4785.998935671587, - "1": -3520.521383204173, - "5": -2855.1671089762676, - "25": -1969.483606794242, - "50": -1447.1879016413761, - "75": -866.6265611311096, - "95": 2049.217650390811, - "99": 3312.4349928765846, - "99.9": 4011.5142868858347 - } - }, - "f3b": { - "units": "A", - "source": "ptdata:F3B", - "description": "Shaping F-coil F3B current (bank B).", - "min": -5503.943071765381, - "max": 4849.177948074737, - "mean": -1005.3848266601562, - "std": 1308.8258056640625, - "pct": { - "0.1": -4452.6277480541985, - "1": -3641.634707712471, - "5": -2937.4861003450947, - "25": -1881.7475544966392, - "50": -1170.6945714968547, - "75": -124.13671681902403, - "95": 1683.5400540223286, - "99": 3015.8060365193123, - "99.9": 3797.6599244161957 - } - }, - "f4b": { - "units": "A", - "source": "ptdata:F4B", - "description": "Shaping F-coil F4B current (bank B).", - "min": -5829.242194941551, - "max": 5787.149431930685, - "mean": 1124.2967529296875, - "std": 1519.5994873046875, - "pct": { - "0.1": -4083.976449898858, - "1": -3247.08251902718, - "5": -2270.942268479742, - "25": 376.8608226937906, - "50": 1392.450441038166, - "75": 2146.7001303629104, - "95": 3145.5476189867913, - "99": 3926.614817946318, - "99.9": 4582.551950710075 - } - }, - "f5b": { - "units": "A", - "source": "ptdata:F5B", - "description": "Shaping F-coil F5B current (bank B).", - "min": -5213.110339059254, - "max": 5388.213772287713, - "mean": 1443.536865234375, - "std": 1408.3306884765625, - "pct": { - "0.1": -4134.61747806435, - "1": -3056.873937432705, - "5": -1361.0988601293998, - "25": 675.1515533174199, - "50": 1572.802070225599, - "75": 2367.5452263604984, - "95": 3528.863240540377, - "99": 4411.454242162536, - "99.9": 4967.30642206674 - } - }, - "f6b": { - "units": "A", - "source": "ptdata:F6B", - "description": "Shaping F-coil F6B current (bank B).", - "min": -7604.653108484432, - "max": 7763.1261416792295, - "mean": -2463.248046875, - "std": 1836.4208984375, - "pct": { - "0.1": -6372.627428710043, - "1": -5251.4106280007745, - "5": -4318.157196234368, - "25": -3524.5849152058445, - "50": -2837.2759930056304, - "75": -2089.94465303326, - "95": 2871.6849973390945, - "99": 3948.010461650111, - "99.9": 4803.251616324593 - } - }, - "f7b": { - "units": "A", - "source": "ptdata:F7B", - "description": "Shaping F-coil F7B current (bank B).", - "min": -11380.254539563213, - "max": 9414.242772782009, - "mean": -2941.56005859375, - "std": 2510.1083984375, - "pct": { - "0.1": -9236.286164628174, - "1": -7962.01372128499, - "5": -6618.689743738845, - "25": -4397.68407591947, - "50": -3041.7944101983817, - "75": -2113.0768216001165, - "95": 2850.240503964187, - "99": 5238.131223534479, - "99.9": 6771.41582857779 - } - }, - "f8b": { - "units": "A", - "source": "ptdata:F8B", - "description": "Shaping F-coil F8B current (bank B).", - "min": -5834.457886045129, - "max": 5952.292180058913, - "mean": 1431.05615234375, - "std": 1718.2965087890625, - "pct": { - "0.1": -4377.886849186064, - "1": -3547.8568327724756, - "5": -2536.325388000092, - "25": 592.1441487378677, - "50": 1743.1741236182588, - "75": 2613.9050347435855, - "95": 3655.019608301406, - "99": 4295.252919476556, - "99.9": 5183.621783504976 - } - }, - "f9b": { - "units": "A", - "source": "ptdata:F9B", - "description": "Shaping F-coil F9B current (bank B).", - "min": -7298.33418485197, - "max": 8673.475372842513, - "mean": -214.02586364746094, - "std": 1388.83447265625, - "pct": { - "0.1": -4443.002941036773, - "1": -3335.961239603393, - "5": -2530.3434455144015, - "25": -1111.6205754278508, - "50": -212.41719832099042, - "75": 564.1401009862525, - "95": 2296.158459733251, - "99": 3401.023805016151, - "99.9": 4981.695296538042 - } - }, - "ecoila": { - "units": "A", - "source": "ptdata:ECOILA", - "description": "Ohmic E-coil bank A current.", - "min": -68526.67779690563, - "max": 65669.33446503483, - "mean": -6965.32666015625, - "std": 18940.9453125, - "pct": { - "0.1": -62521.0592220894, - "1": -53449.0677376177, - "5": -39610.65329064206, - "25": -19599.348704727538, - "50": -6887.604056684089, - "75": 6065.040591650557, - "95": 23926.96154448237, - "99": 33650.27142286909, - "99.9": 48164.54971213867 - } - }, - "ecoilb": { - "units": "A", - "source": "ptdata:ECOILB", - "description": "Ohmic E-coil bank B current.", - "min": -67880.78461590248, - "max": 67380.80764904841, - "mean": -6876.16455078125, - "std": 18723.662109375, - "pct": { - "0.1": -61839.528701402356, - "1": -52787.079189397904, - "5": -39153.2527665565, - "25": -19383.82435886666, - "50": -6768.996463787789, - "75": 6013.297288247475, - "95": 23686.641557508636, - "99": 33187.653018934754, - "99.9": 47362.43837391052 - } - }, - "gasa_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "description": "Calibrated gas injection flow, valve A.", - "min": -0.9805486760911233, - "max": 348.1779045740827, - "mean": 15.054444313049316, - "std": 26.369497299194336, - "pct": { - "0.1": -0.0181447514768128, - "1": 0.0006228885411054819, - "5": 0.0014589414841879034, - "25": 0.00852798057103854, - "50": 0.09974314587981326, - "75": 19.645558552678416, - "95": 71.02669389337856, - "99": 137.36341388263276, - "99.9": 211.79616738152396 - } - }, - "gasb_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "description": "Calibrated gas injection flow, valve B.", - "min": -0.5231055139632899, - "max": 317.69717326145866, - "mean": 1.386172890663147, - "std": 3.4090511798858643, - "pct": { - "0.1": 9.14047308575583e-06, - "1": 0.0007714573310613204, - "5": 0.002068321612864521, - "25": 0.009055124211873267, - "50": 0.07339015461169385, - "75": 1.9421402622606716, - "95": 1.9421402622606716, - "99": 23.663863921838843, - "99.9": 149.40068998150738 - } - }, - "gasc_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "description": "Calibrated gas injection flow, valve C.", - "min": -0.3965804467767108, - "max": 306.0269668007428, - "mean": 0.35034820437431335, - "std": 0.4470684826374054, - "pct": { - "0.1": 7.428448363699935e-05, - "1": 0.00026770734685732656, - "5": 0.0006667805693404416, - "25": 0.002788385500787083, - "50": 0.023577950502740697, - "75": 0.7508911827356307, - "95": 0.7508911827356307, - "99": 2.733332630282, - "99.9": 108.67323889612304 - } - }, - "gasd_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "description": "Calibrated gas injection flow, valve D.", - "min": -0.5287260135880842, - "max": 771.5043798529183, - "mean": 0.528103232383728, - "std": 0.654624342918396, - "pct": { - "0.1": 5.497087182604332e-05, - "1": 0.000175335120693898, - "5": 0.0005482846440516553, - "25": 0.003719433481388368, - "50": 0.08385269566973214, - "75": 1.0383906373403984, - "95": 1.0383906373403984, - "99": 4.359676988215197, - "99.9": 127.54440071212512 - } - }, - "gase_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "description": "Calibrated gas injection flow, valve E.", - "min": -0.2211384331710633, - "max": 672.8582070151267, - "mean": 0.27696067094802856, - "std": 0.17616958916187286, - "pct": { - "0.1": 0.00010156410138473793, - "1": 0.000223585566083373, - "5": 0.0005190716405260032, - "25": 0.011627604901727706, - "50": 0.3920832239686922, - "75": 0.3920832239686922, - "95": 0.3920832239686922, - "99": 0.3920832239686922, - "99.9": 29.75536079519976 - } - }, - "bt": { - "units": "T", - "source": "ptdata:bt", - "description": "Vacuum toroidal magnetic field (signed).", - "min": -2.2353815075115375, - "max": 2.25186423641397, - "mean": -0.971906840801239, - "std": 1.6484158039093018, - "pct": { - "0.1": -2.2151064134142304, - "1": -2.1819873443702726, - "5": -2.136304350652244, - "25": -2.0446028795017246, - "50": -1.8984274308309796, - "75": -1.0260122281948352, - "95": 2.053318112027725, - "99": 2.10945640328767, - "99.9": 2.1819705410137904 - } - } - } -} diff --git a/s4/fuse29_seq.onnx b/s4/fuse29_seq.onnx deleted file mode 100644 index f3509f74a89a7848ed1dee0159b0a620fc894ae1..0000000000000000000000000000000000000000 --- a/s4/fuse29_seq.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2348d2e1930835363dfade74cfc47d46c88e0691693f60e85cffc2d459ecf774 -size 45464382 diff --git a/s4/fuse29_step.onnx b/s4/fuse29_step.onnx deleted file mode 100644 index 3a8486e14cdb2da016d836068a61c2f7ee32baa4..0000000000000000000000000000000000000000 --- a/s4/fuse29_step.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c74bffd61e2c69cae1b8b182fbde8897ce971901d83beded7f6a2e0c919fedc -size 45081271 diff --git a/s4/model_config.json b/s4/model_config.json deleted file mode 100644 index 2b6e71352f1e280451065445e907d4680f883ff0..0000000000000000000000000000000000000000 --- a/s4/model_config.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "schema_version": 1, - "model": "fuse29", - "seed": 4, - "description": "29-input Mamba-2 pedestal predictor for DIII-D. Strictly causal, 20 Hz, nine heads at rho_tor = 0.85.", - "architecture": { - "family": "Mamba-2 (structured state-space duality)", - "d_model": 512, - "n_layers": 6, - "d_state": 128, - "d_conv": 4, - "expand": 2, - "headdim": 128, - "nheads": 8, - "ngroups": 2, - "chunk_size": 100, - "d_inner": 1024, - "conv_dim": 1536, - "n_params": 11254425 - }, - "cadence": { - "hz": 20, - "period_ms": 50.0, - "rho_tor": 0.85 - }, - "inputs": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "n": 29, - "units": { - "pinj": "MW", - "tinj": "N*m", - "ech_total": "MW", - "f1a": "A", - "f2a": "A", - "f3a": "A", - "f4a": "A", - "f5a": "A", - "f6a": "A", - "f7a": "A", - "f8a": "A", - "f9a": "A", - "f1b": "A", - "f2b": "A", - "f3b": "A", - "f4b": "A", - "f5b": "A", - "f6b": "A", - "f7b": "A", - "f8b": "A", - "f9b": "A", - "ecoila": "A", - "ecoilb": "A", - "gasa_cal": "Torr*L/s", - "gasb_cal": "Torr*L/s", - "gasc_cal": "Torr*L/s", - "gasd_cal": "Torr*L/s", - "gase_cal": "Torr*L/s", - "bt": "T" - }, - "sources": { - "pinj": "ptdata:bmspinj", - "tinj": "ptdata:bmstinj", - "ech_total": "ptdata:ECHPWR", - "f1a": "ptdata:F1A", - "f2a": "ptdata:F2A", - "f3a": "ptdata:F3A", - "f4a": "ptdata:F4A", - "f5a": "ptdata:F5A", - "f6a": "ptdata:F6A", - "f7a": "ptdata:F7A", - "f8a": "ptdata:F8A", - "f9a": "ptdata:F9A", - "f1b": "ptdata:F1B", - "f2b": "ptdata:F2B", - "f3b": "ptdata:F3B", - "f4b": "ptdata:F4B", - "f5b": "ptdata:F5B", - "f6b": "ptdata:F6B", - "f7b": "ptdata:F7B", - "f8b": "ptdata:F8B", - "f9b": "ptdata:F9B", - "ecoila": "ptdata:ECOILA", - "ecoilb": "ptdata:ECOILB", - "gasa_cal": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "gasb_cal": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "gasc_cal": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "gasd_cal": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "gase_cal": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "bt": "ptdata:bt" - }, - "descriptions": { - "pinj": "Neutral beam injected power, all sources.", - "tinj": "Neutral beam injected torque, all sources.", - "ech_total": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "f1a": "Shaping F-coil F1A current (bank A).", - "f2a": "Shaping F-coil F2A current (bank A).", - "f3a": "Shaping F-coil F3A current (bank A).", - "f4a": "Shaping F-coil F4A current (bank A).", - "f5a": "Shaping F-coil F5A current (bank A).", - "f6a": "Shaping F-coil F6A current (bank A).", - "f7a": "Shaping F-coil F7A current (bank A).", - "f8a": "Shaping F-coil F8A current (bank A).", - "f9a": "Shaping F-coil F9A current (bank A).", - "f1b": "Shaping F-coil F1B current (bank B).", - "f2b": "Shaping F-coil F2B current (bank B).", - "f3b": "Shaping F-coil F3B current (bank B).", - "f4b": "Shaping F-coil F4B current (bank B).", - "f5b": "Shaping F-coil F5B current (bank B).", - "f6b": "Shaping F-coil F6B current (bank B).", - "f7b": "Shaping F-coil F7B current (bank B).", - "f8b": "Shaping F-coil F8B current (bank B).", - "f9b": "Shaping F-coil F9B current (bank B).", - "ecoila": "Ohmic E-coil bank A current.", - "ecoilb": "Ohmic E-coil bank B current.", - "gasa_cal": "Calibrated gas injection flow, valve A.", - "gasb_cal": "Calibrated gas injection flow, valve B.", - "gasc_cal": "Calibrated gas injection flow, valve C.", - "gasd_cal": "Calibrated gas injection flow, valve D.", - "gase_cal": "Calibrated gas injection flow, valve E.", - "bt": "Vacuum toroidal magnetic field (signed)." - }, - "space": "raw physical units; the graph applies the z-score", - "note": "Check your units against actuator_ranges.json before trusting any output. A unit error produces confident nonsense rather than an exception." - }, - "outputs": { - "names": [ - "ne", - "te_ped", - "ti_ped", - "t_rot_ped", - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc", - "hmode" - ], - "n": 9, - "units": { - "ne": "1e19 m^-3", - "te_ped": "keV", - "ti_ped": "keV", - "t_rot_ped": "krad/s", - "neped_prmtan": "1e19 m^-3", - "teped_prmtan": "keV", - "rho_sym": "rho_tor (dimensionless)", - "ne_top_loc": "rho_tor (dimensionless)", - "hmode": "probability in [0, 1]" - }, - "note": "Physical units. hmode is a probability in [0, 1]; the graph applies the sigmoid.", - "hmode_gated": { - "heads": [ - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc" - ], - "indices": [ - 4, - 5, - 6, - 7 - ], - "threshold": 0.5, - "note": "These four heads were trained only on H-mode rows and are undefined otherwise. The graph does NOT gate them; the consumer must, using the model's own hmode output. See docs/GATING.md." - } - }, - "graphs": { - "fuse29_step.onnx": { - "purpose": "real-time, one 50 ms tick per call", - "inputs": { - "actuators": [ - "batch", - 29 - ], - "conv_state": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "outputs": { - "predictions": [ - "batch", - 9 - ], - "conv_state_out": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state_out": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "initial_state": "all zeros at the start of a shot", - "max_shot_length": "unbounded" - }, - "fuse29_seq.onnx": { - "purpose": "offline scoring of a whole shot", - "inputs": { - "actuators": [ - "batch", - 256, - 29 - ] - }, - "outputs": { - "predictions": [ - "batch", - 256, - 9 - ] - }, - "seq_len": 256, - "note": "Sequence length is FIXED. Right-pad shorter shots with zeros and read the first T outputs; the model is strictly causal so this is exact. For longer shots use the step graph or re-export with --seq-len." - } - }, - "dtype": "float32", - "onnx_opset": 17, - "training": { - "epoch": 22, - "val_loss": 1.1320768278092146, - "note": "See docs/TRAINING.md for the full recipe." - } -} diff --git a/s4/norms.json b/s4/norms.json deleted file mode 100644 index 98c8c06209fd050ed78c21fa5b30afd95a71c171..0000000000000000000000000000000000000000 --- a/s4/norms.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "schema_version": 2, - "note": "Statistics are baked into the shipped ONNX graphs. This file is for inspection and for reproducing the transform outside the graph; it is not required at inference time.", - "actuator_space": "physical", - "std_floor": 1e-06, - "clip_sigma": 20.0, - "provenance": { - "split": "train", - "n_shots": 32731, - "rho_index": 85, - "source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85, random stratified split (split_index.json)", - "note": "Recomputed on the NEW random train split. The source shards carried z-scores from the OLD chronological train split, whose shots overlap our test set. Actuator statistics are winsorised so a corrupted sample cannot set a channel's divisor.", - "inflated_channels": [ - "pinj", - "gasc_cal", - "gasd_cal", - "gase_cal" - ], - "actuator_estimator": "winsorised to p1..p99", - "actuator_space": "physical", - "composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "composition": "z = (x_phys - (m1 + s1*m2)) / (s1*s2), where (m1, s1) is the upstream FPE z-score and (m2, s2) is this model's re-scale onto its own training split" - }, - "actuators": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "mean": [ - 3.838883638381958, - 2.2043209075927734, - 2.6981112957000732, - -1382.3704833984375, - -1229.876708984375, - -592.7352294921875, - 1098.1622314453125, - 1173.57958984375, - -2493.411865234375, - -2367.570556640625, - 996.0214233398438, - -535.8018798828125, - -1373.1888427734375, - -1218.50048828125, - -1005.3848266601562, - 1124.2967529296875, - 1443.536865234375, - -2463.248046875, - -2941.56005859375, - 1431.05615234375, - -214.02586364746094, - -6965.32666015625, - -6876.16455078125, - 15.054444313049316, - 1.386172890663147, - 0.35034820437431335, - 0.528103232383728, - 0.27696067094802856, - -0.971906840801239 - ], - "std": [ - 3.0613932609558105, - 2.11222505569458, - 6.685519218444824, - 1349.629638671875, - 1248.3497314453125, - 1185.706298828125, - 1368.95458984375, - 1352.103759765625, - 1867.8076171875, - 1999.19970703125, - 1498.948974609375, - 1258.01171875, - 1367.82275390625, - 1316.67724609375, - 1308.8258056640625, - 1519.5994873046875, - 1408.3306884765625, - 1836.4208984375, - 2510.1083984375, - 1718.2965087890625, - 1388.83447265625, - 18940.9453125, - 18723.662109375, - 26.369497299194336, - 3.4090511798858643, - 0.4470684826374054, - 0.654624342918396, - 0.17616958916187286, - 1.6484158039093018 - ], - "transform": "z = clip((x - mean) / std, -clip_sigma, +clip_sigma), applied inside the graph" - }, - "targets": { - "ne": { - "mean": 2.7511744499206543, - "std": 1.654153823852539 - }, - "te_ped": { - "mean": 0.5915626287460327, - "std": 0.43467429280281067 - }, - "ti_ped": { - "mean": 1.016850233078003, - "std": 0.681096076965332 - }, - "t_rot_ped": { - "mean": 21.244613647460938, - "std": 16.59148406982422 - }, - "neped_prmtan": { - "mean": 2.7231285572052, - "std": 1.7005536556243896 - }, - "teped_prmtan": { - "mean": 0.46375223994255066, - "std": 0.36919456720352173 - }, - "rho_sym": { - "mean": 0.9757616519927979, - "std": 0.04329206794500351 - }, - "ne_top_loc": { - "mean": 0.9261865019798279, - "std": 0.049897171556949615 - } - }, - "hmode": { - "transform": "sigmoid", - "note": "hmode is a logit in the trunk; the graph applies the sigmoid." - }, - "stages": { - "note": "The composed actuator statistics above are the product of these two. Shown for traceability; use the composed values.", - "stage1_physical_to_fpe_zscore": { - "mean": [ - 2.8111997039100878, - 2.154143940948575, - 2.159654935239209, - -1444.0438445123289, - -1315.1185221229061, - -639.741760304047, - 1172.4978680515835, - 1222.4970107268077, - -2488.8410961768263, - -2491.3739557685253, - 1050.107386405324, - -578.9736547563273, - -1421.0817159358041, - -1285.3967398730092, - -1061.0290851406676, - 1186.4795970820587, - 1460.6822372728345, - -2452.093120847959, - -3071.3132492215186, - 1531.3304960724108, - -262.6728625067526, - -6887.604056684089, - -6768.996463787789, - 14.89178144369171, - 1.9421402622606716, - 0.7508911827356307, - 1.0383906373403984, - 0.3920832239686922, - -1.0310375752078498 - ], - "std": [ - 194.08418888726106, - 2.3684465859740262, - 5.948083564785035, - 1267.4907621702682, - 1217.4478106828162, - 1249.3915272640536, - 1345.3871181128568, - 1359.1934832307923, - 1887.1891497052302, - 1888.1014577442652, - 1559.9875106371376, - 1287.2118470203372, - 1271.813282654729, - 1259.8644805335082, - 1361.9306367877398, - 1521.172083160852, - 1393.2120473032558, - 1856.723912629122, - 2432.8530409799628, - 1705.6959050005082, - 1421.8036451037203, - 19092.148992270486, - 18858.28389193975, - 27.289184462156058, - 11.092415079529571, - 9.017289768908354, - 12.055982101097918, - 6.498888909025979, - 1.599000778986496 - ] - }, - "stage2_fpe_zscore_to_model": { - "mean": [ - 0.0052950419485569, - 0.02118559367954731, - 0.0905260294675827, - 0.04865782707929611, - 0.0700167864561081, - 0.03762352466583252, - -0.05525219440460205, - -0.03599006310105324, - -0.002421961398795247, - 0.06557027250528336, - -0.03467077016830444, - 0.03353898227214813, - 0.03765711933374405, - 0.05309795215725899, - 0.040856875479221344, - -0.04087827727198601, - -0.012306398712098598, - -0.006007813848555088, - 0.05333370715379715, - -0.05878793075680733, - 0.03421499580144882, - -0.004070908762514591, - -0.00568280229344964, - 0.005960696842521429, - -0.050121404230594635, - -0.04441944137215614, - -0.042326491326093674, - -0.017714189365506172, - 0.036979787051677704 - ], - "std": [ - 0.015773532912135124, - 0.8918187022209167, - 1.1239787340164185, - 1.0648043155670166, - 1.0253825187683105, - 0.9490270018577576, - 1.0175172090530396, - 0.994783878326416, - 0.9897299408912659, - 1.0588412284851074, - 0.9608724117279053, - 0.9773152470588684, - 1.0754902362823486, - 1.04509437084198, - 0.9610077142715454, - 0.9989661574363708, - 1.0108516216278076, - 0.9890651702880859, - 1.0317550897598267, - 1.007387399673462, - 0.9768117070198059, - 0.9920803308486938, - 0.9928614497184753, - 0.9662984609603882, - 0.30733174085617065, - 0.04957903176546097, - 0.05429871752858162, - 0.02710764855146408, - 1.030903697013855 - ] - } - } -} diff --git a/s4/provenance.json b/s4/provenance.json deleted file mode 100644 index fe6eb96076cd87eb905c831de963af40e109477f..0000000000000000000000000000000000000000 --- a/s4/provenance.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "schema_version": 1, - "exported_utc": "2026-09-03T00:46:32.537210+00:00", - "seed": 4, - "source_checkpoint": "/flare/fusiondl_aesp/fuse_bd_model/fuse20/runs/fuse29r_s4/best_model.pt", - "source_checkpoint_sha256": "d36f1364948aded5be459beb9a7670d59366272471c4f8ef36338135d8242104", - "norms_source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json", - "norms_actuator_space": "physical", - "norms_composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "onnx_opset": 17, - "exporter": "torch.onnx.export (TorchScript, dynamo=False)", - "versions": { - "torch": "2.10.0a0+git449b176", - "python": "3.12.12", - "platform": "Linux-5.14.21-150400.24.235-default-x86_64-with-glibc2.31", - "onnx": "1.22.0", - "onnxruntime": "1.29.0" - }, - "artifacts": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "7c74bffd61e2c69cae1b8b182fbde8897ce971901d83beded7f6a2e0c919fedc" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "2348d2e1930835363dfade74cfc47d46c88e0691693f60e85cffc2d459ecf774" - } - } -} diff --git a/s5/README.md b/s5/README.md deleted file mode 100644 index ae99ccd96c76158d0ae23f586fd862707db526a0..0000000000000000000000000000000000000000 --- a/s5/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -license: mit -library_name: onnx -tags: - - onnx - - fusion - - plasma-physics - - tokamak - - diii-d - - mamba ---- - -# fuse29 — seed 5 - -This is seed 5, one of eight independently trained runs. Seed 0 is the champion and the default; this one exists so you can measure spread across training runs. Unless you are doing that, you want seed 0. - -29-input Mamba-2 pedestal predictor for DIII-D. Raw physical units in, -physical units out. See the [root model card](https://huggingface.co/SCS-Lab/FUSE29-Pedestal-model) -for the full description, I/O contract, accuracy and limitations. - -| | | -|---|---| -| Seed | 5 | -| Parameters | 11,254,425 | -| Best validation loss | 1.1122 | -| Sequence graph length | 256 ticks | -| ONNX opset | 17 | -| Exported | 2026-09-03T00:46:35.316400+00:00 | -| Source checkpoint SHA-256 | `d01cae015ed05e7e…` | - -## Load - -```python -from fuse29.runtime import Fuse29Predictor - -predictor = Fuse29Predictor.from_pretrained("SCS-Lab/FUSE29-Pedestal-model", seed=5) -``` - -## Files - -| File | | -|---|---| -| `fuse29_step.onnx` | one 50 ms tick, carries state, no length limit | -| `fuse29_seq.onnx` | whole shot at a fixed 256 ticks | -| `model_config.json` | I/O contract: names, order, units, sources, shapes | -| `norms.json` | the statistics baked into the graphs | -| `actuator_ranges.json` | training-split distribution, for checking your units | -| `provenance.json` | source checkpoint hash, library versions, artefact hashes | - -## Before you use it - -- Four heads (`neped_prmtan`, `teped_prmtan`, `rho_sym`, `ne_top_loc`) are - **only valid in H-mode** and the graph does not gate them. Gate on the - model's own `hmode` output. -- `pinj` is in **MW**, not W. Run `predictor.check_units(shot)` once. -- Output column order is not alphabetical. See `model_config.json`. diff --git a/s5/actuator_ranges.json b/s5/actuator_ranges.json deleted file mode 100644 index 08d19f4e80f49e6bbd18c40674b06946a02cc61a..0000000000000000000000000000000000000000 --- a/s5/actuator_ranges.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "schema_version": 1, - "note": "Physical-units distribution of each actuator over the training split. Use it to check that your signals are in the units the graph expects; a unit error is the one preprocessing mistake that produces confident nonsense rather than an exception.", - "split": "train", - "n_shots": 32731, - "n_ticks": 3020926, - "percentiles": [ - 0.1, - 1, - 5, - 25, - 50, - 75, - 95, - 99, - 99.9 - ], - "channels": { - "pinj": { - "units": "MW", - "source": "ptdata:bmspinj", - "description": "Neutral beam injected power, all sources.", - "min": -46005.02701919088, - "max": 17.512712760455507, - "mean": 3.838883638381958, - "std": 3.0613932609558105, - "pct": { - "0.1": -0.004132416388869853, - "1": 4.112187479421436e-09, - "5": 4.112187479421436e-09, - "25": 1.311169336894574, - "50": 3.18466408866965, - "75": 5.748764762873332, - "95": 9.841882532311711, - "99": 12.212702351352696, - "99.9": 14.791924355083399 - } - }, - "tinj": { - "units": "N*m", - "source": "ptdata:bmstinj", - "description": "Neutral beam injected torque, all sources.", - "min": -56.644382966354534, - "max": 129.9833380295058, - "mean": 2.2043209075927734, - "std": 2.11222505569458, - "pct": { - "0.1": -2.0636791725994676, - "1": -0.5384317586520496, - "5": -1.6338495756329507e-07, - "25": 0.4319133403840452, - "50": 1.963846077087278, - "75": 3.1821234334199193, - "95": 6.641525317445799, - "99": 8.941231792062355, - "99.9": 11.156712776956862 - } - }, - "ech_total": { - "units": "MW", - "source": "ptdata:ECHPWR", - "description": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "min": -19.31181996542309, - "max": 40.286455582885246, - "mean": 2.6981112957000732, - "std": 6.685519218444824, - "pct": { - "0.1": -1.0663586061709935, - "1": -0.09982622583332723, - "5": -0.020836448436920674, - "25": -3.2566890961760464e-08, - "50": -3.2566890961760464e-08, - "75": 1.1717011943616973, - "95": 21.558252060431304, - "99": 30.476182922859127, - "99.9": 37.09168917133024 - } - }, - "f1a": { - "units": "A", - "source": "ptdata:F1A", - "description": "Shaping F-coil F1A current (bank A).", - "min": -5776.925892871883, - "max": 5794.3504737288395, - "mean": -1382.3704833984375, - "std": 1349.629638671875, - "pct": { - "0.1": -4852.691808601986, - "1": -4131.456225748339, - "5": -3401.8604035239678, - "25": -2236.4754469921672, - "50": -1501.5458201268116, - "75": -660.4245966463927, - "95": 1294.4315819071094, - "99": 3103.250955923345, - "99.9": 4467.289606367005 - } - }, - "f2a": { - "units": "A", - "source": "ptdata:F2A", - "description": "Shaping F-coil F2A current (bank A).", - "min": -5716.347659616551, - "max": 5702.840977614059, - "mean": -1229.876708984375, - "std": 1248.3497314453125, - "pct": { - "0.1": -4093.397230708888, - "1": -3297.8668360449756, - "5": -2712.522533155646, - "25": -2004.455454331444, - "50": -1443.842241803098, - "75": -854.5004209979342, - "95": 1825.579117167513, - "99": 3097.0902901803724, - "99.9": 3899.548655232026 - } - }, - "f3a": { - "units": "A", - "source": "ptdata:F3A", - "description": "Shaping F-coil F3A current (bank A).", - "min": -5498.272347966228, - "max": 5321.719922394657, - "mean": -592.7352294921875, - "std": 1185.706298828125, - "pct": { - "0.1": -4140.690909683277, - "1": -3539.2136012211317, - "5": -2813.2888996278725, - "25": -1377.7435033975407, - "50": -152.16189816331342, - "75": 2.4453898354848604, - "95": 1203.107532773337, - "99": 2898.3184344684487, - "99.9": 3780.0556837479485 - } - }, - "f4a": { - "units": "A", - "source": "ptdata:F4A", - "description": "Shaping F-coil F4A current (bank A).", - "min": -5876.373800845117, - "max": 5855.700219305917, - "mean": 1098.1622314453125, - "std": 1368.95458984375, - "pct": { - "0.1": -4331.218505807293, - "1": -3344.4526378786877, - "5": -1858.4157962413597, - "25": 395.84891116184133, - "50": 1143.436262581068, - "75": 1990.2677717095535, - "95": 3141.5448401142426, - "99": 3756.430079500399, - "99.9": 4525.754910416766 - } - }, - "f5a": { - "units": "A", - "source": "ptdata:F5A", - "description": "Shaping F-coil F5A current (bank A).", - "min": -5178.8539079385355, - "max": 5353.141466672798, - "mean": 1173.57958984375, - "std": 1352.103759765625, - "pct": { - "0.1": -4592.7059148331355, - "1": -3597.7201189044818, - "5": -1551.4942446467403, - "25": 543.836095032849, - "50": 1273.969119983141, - "75": 2051.0443148459794, - "95": 3019.669622905384, - "99": 3875.454685744494, - "99.9": 4738.506855960392 - } - }, - "f6a": { - "units": "A", - "source": "ptdata:F6A", - "description": "Shaping F-coil F6A current (bank A).", - "min": -7929.903731492232, - "max": 5741.056818467809, - "mean": -2493.411865234375, - "std": 1867.8076171875, - "pct": { - "0.1": -6125.90268588119, - "1": -4963.398523516425, - "5": -4319.477588996284, - "25": -3574.8234234024885, - "50": -2898.635802832382, - "75": -2143.0930801744807, - "95": 2999.75903843203, - "99": 4137.6543157735705, - "99.9": 4783.375582166487 - } - }, - "f7a": { - "units": "A", - "source": "ptdata:F7A", - "description": "Shaping F-coil F7A current (bank A).", - "min": -9825.736080045011, - "max": 8678.484606762057, - "mean": -2367.570556640625, - "std": 1999.19970703125, - "pct": { - "0.1": -7676.219824168618, - "1": -6127.379912259545, - "5": -4909.893927511103, - "25": -3430.1309476786882, - "50": -2697.460342263373, - "75": -1913.0579478721388, - "95": 2723.164038733837, - "99": 3948.221013655396, - "99.9": 5316.086800760559 - } - }, - "f8a": { - "units": "A", - "source": "ptdata:F8A", - "description": "Shaping F-coil F8A current (bank A).", - "min": -5378.835169240788, - "max": 5880.767402237174, - "mean": 996.0214233398438, - "std": 1498.948974609375, - "pct": { - "0.1": -4229.744640827867, - "1": -3363.368412210415, - "5": -1922.2114690963926, - "25": 60.761390529545906, - "50": 1153.9241798399726, - "75": 1951.1572686642544, - "95": 3318.078493605748, - "99": 3973.7764489149104, - "99.9": 4670.296725684707 - } - }, - "f9a": { - "units": "A", - "source": "ptdata:F9A", - "description": "Shaping F-coil F9A current (bank A).", - "min": -7206.032812499594, - "max": 8700.684616308497, - "mean": -535.8018798828125, - "std": 1258.01171875, - "pct": { - "0.1": -4739.927394914494, - "1": -3344.557163847978, - "5": -2567.420669960383, - "25": -1538.6304412830955, - "50": -578.9736547563273, - "75": 353.08467764596537, - "95": 1558.2607279613098, - "99": 2657.691791383836, - "99.9": 4334.930796170508 - } - }, - "f1b": { - "units": "A", - "source": "ptdata:F1B", - "description": "Shaping F-coil F1B current (bank B).", - "min": -5921.943154546981, - "max": 5407.326196618229, - "mean": -1373.1888427734375, - "std": 1367.82275390625, - "pct": { - "0.1": -5179.567735964654, - "1": -4339.478258925401, - "5": -3463.431883510691, - "25": -2205.922070942479, - "50": -1459.5306304510002, - "75": -750.1948036110768, - "95": 1428.796834935177, - "99": 3233.0438718527407, - "99.9": 4240.724502122051 - } - }, - "f2b": { - "units": "A", - "source": "ptdata:F2B", - "description": "Shaping F-coil F2B current (bank B).", - "min": -5788.286812358208, - "max": 5428.562849130928, - "mean": -1218.50048828125, - "std": 1316.67724609375, - "pct": { - "0.1": -4785.998935671587, - "1": -3520.521383204173, - "5": -2855.1671089762676, - "25": -1969.483606794242, - "50": -1447.1879016413761, - "75": -866.6265611311096, - "95": 2049.217650390811, - "99": 3312.4349928765846, - "99.9": 4011.5142868858347 - } - }, - "f3b": { - "units": "A", - "source": "ptdata:F3B", - "description": "Shaping F-coil F3B current (bank B).", - "min": -5503.943071765381, - "max": 4849.177948074737, - "mean": -1005.3848266601562, - "std": 1308.8258056640625, - "pct": { - "0.1": -4452.6277480541985, - "1": -3641.634707712471, - "5": -2937.4861003450947, - "25": -1881.7475544966392, - "50": -1170.6945714968547, - "75": -124.13671681902403, - "95": 1683.5400540223286, - "99": 3015.8060365193123, - "99.9": 3797.6599244161957 - } - }, - "f4b": { - "units": "A", - "source": "ptdata:F4B", - "description": "Shaping F-coil F4B current (bank B).", - "min": -5829.242194941551, - "max": 5787.149431930685, - "mean": 1124.2967529296875, - "std": 1519.5994873046875, - "pct": { - "0.1": -4083.976449898858, - "1": -3247.08251902718, - "5": -2270.942268479742, - "25": 376.8608226937906, - "50": 1392.450441038166, - "75": 2146.7001303629104, - "95": 3145.5476189867913, - "99": 3926.614817946318, - "99.9": 4582.551950710075 - } - }, - "f5b": { - "units": "A", - "source": "ptdata:F5B", - "description": "Shaping F-coil F5B current (bank B).", - "min": -5213.110339059254, - "max": 5388.213772287713, - "mean": 1443.536865234375, - "std": 1408.3306884765625, - "pct": { - "0.1": -4134.61747806435, - "1": -3056.873937432705, - "5": -1361.0988601293998, - "25": 675.1515533174199, - "50": 1572.802070225599, - "75": 2367.5452263604984, - "95": 3528.863240540377, - "99": 4411.454242162536, - "99.9": 4967.30642206674 - } - }, - "f6b": { - "units": "A", - "source": "ptdata:F6B", - "description": "Shaping F-coil F6B current (bank B).", - "min": -7604.653108484432, - "max": 7763.1261416792295, - "mean": -2463.248046875, - "std": 1836.4208984375, - "pct": { - "0.1": -6372.627428710043, - "1": -5251.4106280007745, - "5": -4318.157196234368, - "25": -3524.5849152058445, - "50": -2837.2759930056304, - "75": -2089.94465303326, - "95": 2871.6849973390945, - "99": 3948.010461650111, - "99.9": 4803.251616324593 - } - }, - "f7b": { - "units": "A", - "source": "ptdata:F7B", - "description": "Shaping F-coil F7B current (bank B).", - "min": -11380.254539563213, - "max": 9414.242772782009, - "mean": -2941.56005859375, - "std": 2510.1083984375, - "pct": { - "0.1": -9236.286164628174, - "1": -7962.01372128499, - "5": -6618.689743738845, - "25": -4397.68407591947, - "50": -3041.7944101983817, - "75": -2113.0768216001165, - "95": 2850.240503964187, - "99": 5238.131223534479, - "99.9": 6771.41582857779 - } - }, - "f8b": { - "units": "A", - "source": "ptdata:F8B", - "description": "Shaping F-coil F8B current (bank B).", - "min": -5834.457886045129, - "max": 5952.292180058913, - "mean": 1431.05615234375, - "std": 1718.2965087890625, - "pct": { - "0.1": -4377.886849186064, - "1": -3547.8568327724756, - "5": -2536.325388000092, - "25": 592.1441487378677, - "50": 1743.1741236182588, - "75": 2613.9050347435855, - "95": 3655.019608301406, - "99": 4295.252919476556, - "99.9": 5183.621783504976 - } - }, - "f9b": { - "units": "A", - "source": "ptdata:F9B", - "description": "Shaping F-coil F9B current (bank B).", - "min": -7298.33418485197, - "max": 8673.475372842513, - "mean": -214.02586364746094, - "std": 1388.83447265625, - "pct": { - "0.1": -4443.002941036773, - "1": -3335.961239603393, - "5": -2530.3434455144015, - "25": -1111.6205754278508, - "50": -212.41719832099042, - "75": 564.1401009862525, - "95": 2296.158459733251, - "99": 3401.023805016151, - "99.9": 4981.695296538042 - } - }, - "ecoila": { - "units": "A", - "source": "ptdata:ECOILA", - "description": "Ohmic E-coil bank A current.", - "min": -68526.67779690563, - "max": 65669.33446503483, - "mean": -6965.32666015625, - "std": 18940.9453125, - "pct": { - "0.1": -62521.0592220894, - "1": -53449.0677376177, - "5": -39610.65329064206, - "25": -19599.348704727538, - "50": -6887.604056684089, - "75": 6065.040591650557, - "95": 23926.96154448237, - "99": 33650.27142286909, - "99.9": 48164.54971213867 - } - }, - "ecoilb": { - "units": "A", - "source": "ptdata:ECOILB", - "description": "Ohmic E-coil bank B current.", - "min": -67880.78461590248, - "max": 67380.80764904841, - "mean": -6876.16455078125, - "std": 18723.662109375, - "pct": { - "0.1": -61839.528701402356, - "1": -52787.079189397904, - "5": -39153.2527665565, - "25": -19383.82435886666, - "50": -6768.996463787789, - "75": 6013.297288247475, - "95": 23686.641557508636, - "99": 33187.653018934754, - "99.9": 47362.43837391052 - } - }, - "gasa_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "description": "Calibrated gas injection flow, valve A.", - "min": -0.9805486760911233, - "max": 348.1779045740827, - "mean": 15.054444313049316, - "std": 26.369497299194336, - "pct": { - "0.1": -0.0181447514768128, - "1": 0.0006228885411054819, - "5": 0.0014589414841879034, - "25": 0.00852798057103854, - "50": 0.09974314587981326, - "75": 19.645558552678416, - "95": 71.02669389337856, - "99": 137.36341388263276, - "99.9": 211.79616738152396 - } - }, - "gasb_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "description": "Calibrated gas injection flow, valve B.", - "min": -0.5231055139632899, - "max": 317.69717326145866, - "mean": 1.386172890663147, - "std": 3.4090511798858643, - "pct": { - "0.1": 9.14047308575583e-06, - "1": 0.0007714573310613204, - "5": 0.002068321612864521, - "25": 0.009055124211873267, - "50": 0.07339015461169385, - "75": 1.9421402622606716, - "95": 1.9421402622606716, - "99": 23.663863921838843, - "99.9": 149.40068998150738 - } - }, - "gasc_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "description": "Calibrated gas injection flow, valve C.", - "min": -0.3965804467767108, - "max": 306.0269668007428, - "mean": 0.35034820437431335, - "std": 0.4470684826374054, - "pct": { - "0.1": 7.428448363699935e-05, - "1": 0.00026770734685732656, - "5": 0.0006667805693404416, - "25": 0.002788385500787083, - "50": 0.023577950502740697, - "75": 0.7508911827356307, - "95": 0.7508911827356307, - "99": 2.733332630282, - "99.9": 108.67323889612304 - } - }, - "gasd_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "description": "Calibrated gas injection flow, valve D.", - "min": -0.5287260135880842, - "max": 771.5043798529183, - "mean": 0.528103232383728, - "std": 0.654624342918396, - "pct": { - "0.1": 5.497087182604332e-05, - "1": 0.000175335120693898, - "5": 0.0005482846440516553, - "25": 0.003719433481388368, - "50": 0.08385269566973214, - "75": 1.0383906373403984, - "95": 1.0383906373403984, - "99": 4.359676988215197, - "99.9": 127.54440071212512 - } - }, - "gase_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "description": "Calibrated gas injection flow, valve E.", - "min": -0.2211384331710633, - "max": 672.8582070151267, - "mean": 0.27696067094802856, - "std": 0.17616958916187286, - "pct": { - "0.1": 0.00010156410138473793, - "1": 0.000223585566083373, - "5": 0.0005190716405260032, - "25": 0.011627604901727706, - "50": 0.3920832239686922, - "75": 0.3920832239686922, - "95": 0.3920832239686922, - "99": 0.3920832239686922, - "99.9": 29.75536079519976 - } - }, - "bt": { - "units": "T", - "source": "ptdata:bt", - "description": "Vacuum toroidal magnetic field (signed).", - "min": -2.2353815075115375, - "max": 2.25186423641397, - "mean": -0.971906840801239, - "std": 1.6484158039093018, - "pct": { - "0.1": -2.2151064134142304, - "1": -2.1819873443702726, - "5": -2.136304350652244, - "25": -2.0446028795017246, - "50": -1.8984274308309796, - "75": -1.0260122281948352, - "95": 2.053318112027725, - "99": 2.10945640328767, - "99.9": 2.1819705410137904 - } - } - } -} diff --git a/s5/fuse29_seq.onnx b/s5/fuse29_seq.onnx deleted file mode 100644 index 321dff6f6cdec5a5f93397bfcc109ce78bfd0f62..0000000000000000000000000000000000000000 --- a/s5/fuse29_seq.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bee461499d85d1cf7ce5b4f5f56ab1bf13b55066737c08147e860211b0091ff3 -size 45464382 diff --git a/s5/fuse29_step.onnx b/s5/fuse29_step.onnx deleted file mode 100644 index 6ed45aa7ed5cde7a55a77bee14fcf22ae985dac7..0000000000000000000000000000000000000000 --- a/s5/fuse29_step.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1e10c13fc85dd992fafbaddc8b3dd01d11aabaf757e3e125329a699d298a6a11 -size 45081271 diff --git a/s5/model_config.json b/s5/model_config.json deleted file mode 100644 index 3a0cd208e21b7cfccce744f26f997ed535b33e8c..0000000000000000000000000000000000000000 --- a/s5/model_config.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "schema_version": 1, - "model": "fuse29", - "seed": 5, - "description": "29-input Mamba-2 pedestal predictor for DIII-D. Strictly causal, 20 Hz, nine heads at rho_tor = 0.85.", - "architecture": { - "family": "Mamba-2 (structured state-space duality)", - "d_model": 512, - "n_layers": 6, - "d_state": 128, - "d_conv": 4, - "expand": 2, - "headdim": 128, - "nheads": 8, - "ngroups": 2, - "chunk_size": 100, - "d_inner": 1024, - "conv_dim": 1536, - "n_params": 11254425 - }, - "cadence": { - "hz": 20, - "period_ms": 50.0, - "rho_tor": 0.85 - }, - "inputs": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "n": 29, - "units": { - "pinj": "MW", - "tinj": "N*m", - "ech_total": "MW", - "f1a": "A", - "f2a": "A", - "f3a": "A", - "f4a": "A", - "f5a": "A", - "f6a": "A", - "f7a": "A", - "f8a": "A", - "f9a": "A", - "f1b": "A", - "f2b": "A", - "f3b": "A", - "f4b": "A", - "f5b": "A", - "f6b": "A", - "f7b": "A", - "f8b": "A", - "f9b": "A", - "ecoila": "A", - "ecoilb": "A", - "gasa_cal": "Torr*L/s", - "gasb_cal": "Torr*L/s", - "gasc_cal": "Torr*L/s", - "gasd_cal": "Torr*L/s", - "gase_cal": "Torr*L/s", - "bt": "T" - }, - "sources": { - "pinj": "ptdata:bmspinj", - "tinj": "ptdata:bmstinj", - "ech_total": "ptdata:ECHPWR", - "f1a": "ptdata:F1A", - "f2a": "ptdata:F2A", - "f3a": "ptdata:F3A", - "f4a": "ptdata:F4A", - "f5a": "ptdata:F5A", - "f6a": "ptdata:F6A", - "f7a": "ptdata:F7A", - "f8a": "ptdata:F8A", - "f9a": "ptdata:F9A", - "f1b": "ptdata:F1B", - "f2b": "ptdata:F2B", - "f3b": "ptdata:F3B", - "f4b": "ptdata:F4B", - "f5b": "ptdata:F5B", - "f6b": "ptdata:F6B", - "f7b": "ptdata:F7B", - "f8b": "ptdata:F8B", - "f9b": "ptdata:F9B", - "ecoila": "ptdata:ECOILA", - "ecoilb": "ptdata:ECOILB", - "gasa_cal": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "gasb_cal": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "gasc_cal": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "gasd_cal": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "gase_cal": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "bt": "ptdata:bt" - }, - "descriptions": { - "pinj": "Neutral beam injected power, all sources.", - "tinj": "Neutral beam injected torque, all sources.", - "ech_total": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "f1a": "Shaping F-coil F1A current (bank A).", - "f2a": "Shaping F-coil F2A current (bank A).", - "f3a": "Shaping F-coil F3A current (bank A).", - "f4a": "Shaping F-coil F4A current (bank A).", - "f5a": "Shaping F-coil F5A current (bank A).", - "f6a": "Shaping F-coil F6A current (bank A).", - "f7a": "Shaping F-coil F7A current (bank A).", - "f8a": "Shaping F-coil F8A current (bank A).", - "f9a": "Shaping F-coil F9A current (bank A).", - "f1b": "Shaping F-coil F1B current (bank B).", - "f2b": "Shaping F-coil F2B current (bank B).", - "f3b": "Shaping F-coil F3B current (bank B).", - "f4b": "Shaping F-coil F4B current (bank B).", - "f5b": "Shaping F-coil F5B current (bank B).", - "f6b": "Shaping F-coil F6B current (bank B).", - "f7b": "Shaping F-coil F7B current (bank B).", - "f8b": "Shaping F-coil F8B current (bank B).", - "f9b": "Shaping F-coil F9B current (bank B).", - "ecoila": "Ohmic E-coil bank A current.", - "ecoilb": "Ohmic E-coil bank B current.", - "gasa_cal": "Calibrated gas injection flow, valve A.", - "gasb_cal": "Calibrated gas injection flow, valve B.", - "gasc_cal": "Calibrated gas injection flow, valve C.", - "gasd_cal": "Calibrated gas injection flow, valve D.", - "gase_cal": "Calibrated gas injection flow, valve E.", - "bt": "Vacuum toroidal magnetic field (signed)." - }, - "space": "raw physical units; the graph applies the z-score", - "note": "Check your units against actuator_ranges.json before trusting any output. A unit error produces confident nonsense rather than an exception." - }, - "outputs": { - "names": [ - "ne", - "te_ped", - "ti_ped", - "t_rot_ped", - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc", - "hmode" - ], - "n": 9, - "units": { - "ne": "1e19 m^-3", - "te_ped": "keV", - "ti_ped": "keV", - "t_rot_ped": "krad/s", - "neped_prmtan": "1e19 m^-3", - "teped_prmtan": "keV", - "rho_sym": "rho_tor (dimensionless)", - "ne_top_loc": "rho_tor (dimensionless)", - "hmode": "probability in [0, 1]" - }, - "note": "Physical units. hmode is a probability in [0, 1]; the graph applies the sigmoid.", - "hmode_gated": { - "heads": [ - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc" - ], - "indices": [ - 4, - 5, - 6, - 7 - ], - "threshold": 0.5, - "note": "These four heads were trained only on H-mode rows and are undefined otherwise. The graph does NOT gate them; the consumer must, using the model's own hmode output. See docs/GATING.md." - } - }, - "graphs": { - "fuse29_step.onnx": { - "purpose": "real-time, one 50 ms tick per call", - "inputs": { - "actuators": [ - "batch", - 29 - ], - "conv_state": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "outputs": { - "predictions": [ - "batch", - 9 - ], - "conv_state_out": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state_out": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "initial_state": "all zeros at the start of a shot", - "max_shot_length": "unbounded" - }, - "fuse29_seq.onnx": { - "purpose": "offline scoring of a whole shot", - "inputs": { - "actuators": [ - "batch", - 256, - 29 - ] - }, - "outputs": { - "predictions": [ - "batch", - 256, - 9 - ] - }, - "seq_len": 256, - "note": "Sequence length is FIXED. Right-pad shorter shots with zeros and read the first T outputs; the model is strictly causal so this is exact. For longer shots use the step graph or re-export with --seq-len." - } - }, - "dtype": "float32", - "onnx_opset": 17, - "training": { - "epoch": 21, - "val_loss": 1.1122196558862925, - "note": "See docs/TRAINING.md for the full recipe." - } -} diff --git a/s5/norms.json b/s5/norms.json deleted file mode 100644 index 98c8c06209fd050ed78c21fa5b30afd95a71c171..0000000000000000000000000000000000000000 --- a/s5/norms.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "schema_version": 2, - "note": "Statistics are baked into the shipped ONNX graphs. This file is for inspection and for reproducing the transform outside the graph; it is not required at inference time.", - "actuator_space": "physical", - "std_floor": 1e-06, - "clip_sigma": 20.0, - "provenance": { - "split": "train", - "n_shots": 32731, - "rho_index": 85, - "source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85, random stratified split (split_index.json)", - "note": "Recomputed on the NEW random train split. The source shards carried z-scores from the OLD chronological train split, whose shots overlap our test set. Actuator statistics are winsorised so a corrupted sample cannot set a channel's divisor.", - "inflated_channels": [ - "pinj", - "gasc_cal", - "gasd_cal", - "gase_cal" - ], - "actuator_estimator": "winsorised to p1..p99", - "actuator_space": "physical", - "composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "composition": "z = (x_phys - (m1 + s1*m2)) / (s1*s2), where (m1, s1) is the upstream FPE z-score and (m2, s2) is this model's re-scale onto its own training split" - }, - "actuators": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "mean": [ - 3.838883638381958, - 2.2043209075927734, - 2.6981112957000732, - -1382.3704833984375, - -1229.876708984375, - -592.7352294921875, - 1098.1622314453125, - 1173.57958984375, - -2493.411865234375, - -2367.570556640625, - 996.0214233398438, - -535.8018798828125, - -1373.1888427734375, - -1218.50048828125, - -1005.3848266601562, - 1124.2967529296875, - 1443.536865234375, - -2463.248046875, - -2941.56005859375, - 1431.05615234375, - -214.02586364746094, - -6965.32666015625, - -6876.16455078125, - 15.054444313049316, - 1.386172890663147, - 0.35034820437431335, - 0.528103232383728, - 0.27696067094802856, - -0.971906840801239 - ], - "std": [ - 3.0613932609558105, - 2.11222505569458, - 6.685519218444824, - 1349.629638671875, - 1248.3497314453125, - 1185.706298828125, - 1368.95458984375, - 1352.103759765625, - 1867.8076171875, - 1999.19970703125, - 1498.948974609375, - 1258.01171875, - 1367.82275390625, - 1316.67724609375, - 1308.8258056640625, - 1519.5994873046875, - 1408.3306884765625, - 1836.4208984375, - 2510.1083984375, - 1718.2965087890625, - 1388.83447265625, - 18940.9453125, - 18723.662109375, - 26.369497299194336, - 3.4090511798858643, - 0.4470684826374054, - 0.654624342918396, - 0.17616958916187286, - 1.6484158039093018 - ], - "transform": "z = clip((x - mean) / std, -clip_sigma, +clip_sigma), applied inside the graph" - }, - "targets": { - "ne": { - "mean": 2.7511744499206543, - "std": 1.654153823852539 - }, - "te_ped": { - "mean": 0.5915626287460327, - "std": 0.43467429280281067 - }, - "ti_ped": { - "mean": 1.016850233078003, - "std": 0.681096076965332 - }, - "t_rot_ped": { - "mean": 21.244613647460938, - "std": 16.59148406982422 - }, - "neped_prmtan": { - "mean": 2.7231285572052, - "std": 1.7005536556243896 - }, - "teped_prmtan": { - "mean": 0.46375223994255066, - "std": 0.36919456720352173 - }, - "rho_sym": { - "mean": 0.9757616519927979, - "std": 0.04329206794500351 - }, - "ne_top_loc": { - "mean": 0.9261865019798279, - "std": 0.049897171556949615 - } - }, - "hmode": { - "transform": "sigmoid", - "note": "hmode is a logit in the trunk; the graph applies the sigmoid." - }, - "stages": { - "note": "The composed actuator statistics above are the product of these two. Shown for traceability; use the composed values.", - "stage1_physical_to_fpe_zscore": { - "mean": [ - 2.8111997039100878, - 2.154143940948575, - 2.159654935239209, - -1444.0438445123289, - -1315.1185221229061, - -639.741760304047, - 1172.4978680515835, - 1222.4970107268077, - -2488.8410961768263, - -2491.3739557685253, - 1050.107386405324, - -578.9736547563273, - -1421.0817159358041, - -1285.3967398730092, - -1061.0290851406676, - 1186.4795970820587, - 1460.6822372728345, - -2452.093120847959, - -3071.3132492215186, - 1531.3304960724108, - -262.6728625067526, - -6887.604056684089, - -6768.996463787789, - 14.89178144369171, - 1.9421402622606716, - 0.7508911827356307, - 1.0383906373403984, - 0.3920832239686922, - -1.0310375752078498 - ], - "std": [ - 194.08418888726106, - 2.3684465859740262, - 5.948083564785035, - 1267.4907621702682, - 1217.4478106828162, - 1249.3915272640536, - 1345.3871181128568, - 1359.1934832307923, - 1887.1891497052302, - 1888.1014577442652, - 1559.9875106371376, - 1287.2118470203372, - 1271.813282654729, - 1259.8644805335082, - 1361.9306367877398, - 1521.172083160852, - 1393.2120473032558, - 1856.723912629122, - 2432.8530409799628, - 1705.6959050005082, - 1421.8036451037203, - 19092.148992270486, - 18858.28389193975, - 27.289184462156058, - 11.092415079529571, - 9.017289768908354, - 12.055982101097918, - 6.498888909025979, - 1.599000778986496 - ] - }, - "stage2_fpe_zscore_to_model": { - "mean": [ - 0.0052950419485569, - 0.02118559367954731, - 0.0905260294675827, - 0.04865782707929611, - 0.0700167864561081, - 0.03762352466583252, - -0.05525219440460205, - -0.03599006310105324, - -0.002421961398795247, - 0.06557027250528336, - -0.03467077016830444, - 0.03353898227214813, - 0.03765711933374405, - 0.05309795215725899, - 0.040856875479221344, - -0.04087827727198601, - -0.012306398712098598, - -0.006007813848555088, - 0.05333370715379715, - -0.05878793075680733, - 0.03421499580144882, - -0.004070908762514591, - -0.00568280229344964, - 0.005960696842521429, - -0.050121404230594635, - -0.04441944137215614, - -0.042326491326093674, - -0.017714189365506172, - 0.036979787051677704 - ], - "std": [ - 0.015773532912135124, - 0.8918187022209167, - 1.1239787340164185, - 1.0648043155670166, - 1.0253825187683105, - 0.9490270018577576, - 1.0175172090530396, - 0.994783878326416, - 0.9897299408912659, - 1.0588412284851074, - 0.9608724117279053, - 0.9773152470588684, - 1.0754902362823486, - 1.04509437084198, - 0.9610077142715454, - 0.9989661574363708, - 1.0108516216278076, - 0.9890651702880859, - 1.0317550897598267, - 1.007387399673462, - 0.9768117070198059, - 0.9920803308486938, - 0.9928614497184753, - 0.9662984609603882, - 0.30733174085617065, - 0.04957903176546097, - 0.05429871752858162, - 0.02710764855146408, - 1.030903697013855 - ] - } - } -} diff --git a/s5/provenance.json b/s5/provenance.json deleted file mode 100644 index bfe8f23582c786e1724b96026b6051923cc1bd0d..0000000000000000000000000000000000000000 --- a/s5/provenance.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "schema_version": 1, - "exported_utc": "2026-09-03T00:46:35.316400+00:00", - "seed": 5, - "source_checkpoint": "/flare/fusiondl_aesp/fuse_bd_model/fuse20/runs/fuse29r_s5/best_model.pt", - "source_checkpoint_sha256": "d01cae015ed05e7e2b97df02796afb8c5aaf4ee36573ed534a2ed9dd9a16c275", - "norms_source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json", - "norms_actuator_space": "physical", - "norms_composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "onnx_opset": 17, - "exporter": "torch.onnx.export (TorchScript, dynamo=False)", - "versions": { - "torch": "2.10.0a0+git449b176", - "python": "3.12.12", - "platform": "Linux-5.14.21-150400.24.235-default-x86_64-with-glibc2.31", - "onnx": "1.22.0", - "onnxruntime": "1.29.0" - }, - "artifacts": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "1e10c13fc85dd992fafbaddc8b3dd01d11aabaf757e3e125329a699d298a6a11" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "bee461499d85d1cf7ce5b4f5f56ab1bf13b55066737c08147e860211b0091ff3" - } - } -} diff --git a/s6/README.md b/s6/README.md deleted file mode 100644 index 77f692cc7b56786d31ec20cdf57798f0753d57e5..0000000000000000000000000000000000000000 --- a/s6/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -license: mit -library_name: onnx -tags: - - onnx - - fusion - - plasma-physics - - tokamak - - diii-d - - mamba ---- - -# fuse29 — seed 6 - -This is seed 6, one of eight independently trained runs. Seed 0 is the champion and the default; this one exists so you can measure spread across training runs. Unless you are doing that, you want seed 0. - -29-input Mamba-2 pedestal predictor for DIII-D. Raw physical units in, -physical units out. See the [root model card](https://huggingface.co/SCS-Lab/FUSE29-Pedestal-model) -for the full description, I/O contract, accuracy and limitations. - -| | | -|---|---| -| Seed | 6 | -| Parameters | 11,254,425 | -| Best validation loss | 1.1162 | -| Sequence graph length | 256 ticks | -| ONNX opset | 17 | -| Exported | 2026-09-03T00:46:38.050137+00:00 | -| Source checkpoint SHA-256 | `97dfda0fd4b66942…` | - -## Load - -```python -from fuse29.runtime import Fuse29Predictor - -predictor = Fuse29Predictor.from_pretrained("SCS-Lab/FUSE29-Pedestal-model", seed=6) -``` - -## Files - -| File | | -|---|---| -| `fuse29_step.onnx` | one 50 ms tick, carries state, no length limit | -| `fuse29_seq.onnx` | whole shot at a fixed 256 ticks | -| `model_config.json` | I/O contract: names, order, units, sources, shapes | -| `norms.json` | the statistics baked into the graphs | -| `actuator_ranges.json` | training-split distribution, for checking your units | -| `provenance.json` | source checkpoint hash, library versions, artefact hashes | - -## Before you use it - -- Four heads (`neped_prmtan`, `teped_prmtan`, `rho_sym`, `ne_top_loc`) are - **only valid in H-mode** and the graph does not gate them. Gate on the - model's own `hmode` output. -- `pinj` is in **MW**, not W. Run `predictor.check_units(shot)` once. -- Output column order is not alphabetical. See `model_config.json`. diff --git a/s6/actuator_ranges.json b/s6/actuator_ranges.json deleted file mode 100644 index 08d19f4e80f49e6bbd18c40674b06946a02cc61a..0000000000000000000000000000000000000000 --- a/s6/actuator_ranges.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "schema_version": 1, - "note": "Physical-units distribution of each actuator over the training split. Use it to check that your signals are in the units the graph expects; a unit error is the one preprocessing mistake that produces confident nonsense rather than an exception.", - "split": "train", - "n_shots": 32731, - "n_ticks": 3020926, - "percentiles": [ - 0.1, - 1, - 5, - 25, - 50, - 75, - 95, - 99, - 99.9 - ], - "channels": { - "pinj": { - "units": "MW", - "source": "ptdata:bmspinj", - "description": "Neutral beam injected power, all sources.", - "min": -46005.02701919088, - "max": 17.512712760455507, - "mean": 3.838883638381958, - "std": 3.0613932609558105, - "pct": { - "0.1": -0.004132416388869853, - "1": 4.112187479421436e-09, - "5": 4.112187479421436e-09, - "25": 1.311169336894574, - "50": 3.18466408866965, - "75": 5.748764762873332, - "95": 9.841882532311711, - "99": 12.212702351352696, - "99.9": 14.791924355083399 - } - }, - "tinj": { - "units": "N*m", - "source": "ptdata:bmstinj", - "description": "Neutral beam injected torque, all sources.", - "min": -56.644382966354534, - "max": 129.9833380295058, - "mean": 2.2043209075927734, - "std": 2.11222505569458, - "pct": { - "0.1": -2.0636791725994676, - "1": -0.5384317586520496, - "5": -1.6338495756329507e-07, - "25": 0.4319133403840452, - "50": 1.963846077087278, - "75": 3.1821234334199193, - "95": 6.641525317445799, - "99": 8.941231792062355, - "99.9": 11.156712776956862 - } - }, - "ech_total": { - "units": "MW", - "source": "ptdata:ECHPWR", - "description": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "min": -19.31181996542309, - "max": 40.286455582885246, - "mean": 2.6981112957000732, - "std": 6.685519218444824, - "pct": { - "0.1": -1.0663586061709935, - "1": -0.09982622583332723, - "5": -0.020836448436920674, - "25": -3.2566890961760464e-08, - "50": -3.2566890961760464e-08, - "75": 1.1717011943616973, - "95": 21.558252060431304, - "99": 30.476182922859127, - "99.9": 37.09168917133024 - } - }, - "f1a": { - "units": "A", - "source": "ptdata:F1A", - "description": "Shaping F-coil F1A current (bank A).", - "min": -5776.925892871883, - "max": 5794.3504737288395, - "mean": -1382.3704833984375, - "std": 1349.629638671875, - "pct": { - "0.1": -4852.691808601986, - "1": -4131.456225748339, - "5": -3401.8604035239678, - "25": -2236.4754469921672, - "50": -1501.5458201268116, - "75": -660.4245966463927, - "95": 1294.4315819071094, - "99": 3103.250955923345, - "99.9": 4467.289606367005 - } - }, - "f2a": { - "units": "A", - "source": "ptdata:F2A", - "description": "Shaping F-coil F2A current (bank A).", - "min": -5716.347659616551, - "max": 5702.840977614059, - "mean": -1229.876708984375, - "std": 1248.3497314453125, - "pct": { - "0.1": -4093.397230708888, - "1": -3297.8668360449756, - "5": -2712.522533155646, - "25": -2004.455454331444, - "50": -1443.842241803098, - "75": -854.5004209979342, - "95": 1825.579117167513, - "99": 3097.0902901803724, - "99.9": 3899.548655232026 - } - }, - "f3a": { - "units": "A", - "source": "ptdata:F3A", - "description": "Shaping F-coil F3A current (bank A).", - "min": -5498.272347966228, - "max": 5321.719922394657, - "mean": -592.7352294921875, - "std": 1185.706298828125, - "pct": { - "0.1": -4140.690909683277, - "1": -3539.2136012211317, - "5": -2813.2888996278725, - "25": -1377.7435033975407, - "50": -152.16189816331342, - "75": 2.4453898354848604, - "95": 1203.107532773337, - "99": 2898.3184344684487, - "99.9": 3780.0556837479485 - } - }, - "f4a": { - "units": "A", - "source": "ptdata:F4A", - "description": "Shaping F-coil F4A current (bank A).", - "min": -5876.373800845117, - "max": 5855.700219305917, - "mean": 1098.1622314453125, - "std": 1368.95458984375, - "pct": { - "0.1": -4331.218505807293, - "1": -3344.4526378786877, - "5": -1858.4157962413597, - "25": 395.84891116184133, - "50": 1143.436262581068, - "75": 1990.2677717095535, - "95": 3141.5448401142426, - "99": 3756.430079500399, - "99.9": 4525.754910416766 - } - }, - "f5a": { - "units": "A", - "source": "ptdata:F5A", - "description": "Shaping F-coil F5A current (bank A).", - "min": -5178.8539079385355, - "max": 5353.141466672798, - "mean": 1173.57958984375, - "std": 1352.103759765625, - "pct": { - "0.1": -4592.7059148331355, - "1": -3597.7201189044818, - "5": -1551.4942446467403, - "25": 543.836095032849, - "50": 1273.969119983141, - "75": 2051.0443148459794, - "95": 3019.669622905384, - "99": 3875.454685744494, - "99.9": 4738.506855960392 - } - }, - "f6a": { - "units": "A", - "source": "ptdata:F6A", - "description": "Shaping F-coil F6A current (bank A).", - "min": -7929.903731492232, - "max": 5741.056818467809, - "mean": -2493.411865234375, - "std": 1867.8076171875, - "pct": { - "0.1": -6125.90268588119, - "1": -4963.398523516425, - "5": -4319.477588996284, - "25": -3574.8234234024885, - "50": -2898.635802832382, - "75": -2143.0930801744807, - "95": 2999.75903843203, - "99": 4137.6543157735705, - "99.9": 4783.375582166487 - } - }, - "f7a": { - "units": "A", - "source": "ptdata:F7A", - "description": "Shaping F-coil F7A current (bank A).", - "min": -9825.736080045011, - "max": 8678.484606762057, - "mean": -2367.570556640625, - "std": 1999.19970703125, - "pct": { - "0.1": -7676.219824168618, - "1": -6127.379912259545, - "5": -4909.893927511103, - "25": -3430.1309476786882, - "50": -2697.460342263373, - "75": -1913.0579478721388, - "95": 2723.164038733837, - "99": 3948.221013655396, - "99.9": 5316.086800760559 - } - }, - "f8a": { - "units": "A", - "source": "ptdata:F8A", - "description": "Shaping F-coil F8A current (bank A).", - "min": -5378.835169240788, - "max": 5880.767402237174, - "mean": 996.0214233398438, - "std": 1498.948974609375, - "pct": { - "0.1": -4229.744640827867, - "1": -3363.368412210415, - "5": -1922.2114690963926, - "25": 60.761390529545906, - "50": 1153.9241798399726, - "75": 1951.1572686642544, - "95": 3318.078493605748, - "99": 3973.7764489149104, - "99.9": 4670.296725684707 - } - }, - "f9a": { - "units": "A", - "source": "ptdata:F9A", - "description": "Shaping F-coil F9A current (bank A).", - "min": -7206.032812499594, - "max": 8700.684616308497, - "mean": -535.8018798828125, - "std": 1258.01171875, - "pct": { - "0.1": -4739.927394914494, - "1": -3344.557163847978, - "5": -2567.420669960383, - "25": -1538.6304412830955, - "50": -578.9736547563273, - "75": 353.08467764596537, - "95": 1558.2607279613098, - "99": 2657.691791383836, - "99.9": 4334.930796170508 - } - }, - "f1b": { - "units": "A", - "source": "ptdata:F1B", - "description": "Shaping F-coil F1B current (bank B).", - "min": -5921.943154546981, - "max": 5407.326196618229, - "mean": -1373.1888427734375, - "std": 1367.82275390625, - "pct": { - "0.1": -5179.567735964654, - "1": -4339.478258925401, - "5": -3463.431883510691, - "25": -2205.922070942479, - "50": -1459.5306304510002, - "75": -750.1948036110768, - "95": 1428.796834935177, - "99": 3233.0438718527407, - "99.9": 4240.724502122051 - } - }, - "f2b": { - "units": "A", - "source": "ptdata:F2B", - "description": "Shaping F-coil F2B current (bank B).", - "min": -5788.286812358208, - "max": 5428.562849130928, - "mean": -1218.50048828125, - "std": 1316.67724609375, - "pct": { - "0.1": -4785.998935671587, - "1": -3520.521383204173, - "5": -2855.1671089762676, - "25": -1969.483606794242, - "50": -1447.1879016413761, - "75": -866.6265611311096, - "95": 2049.217650390811, - "99": 3312.4349928765846, - "99.9": 4011.5142868858347 - } - }, - "f3b": { - "units": "A", - "source": "ptdata:F3B", - "description": "Shaping F-coil F3B current (bank B).", - "min": -5503.943071765381, - "max": 4849.177948074737, - "mean": -1005.3848266601562, - "std": 1308.8258056640625, - "pct": { - "0.1": -4452.6277480541985, - "1": -3641.634707712471, - "5": -2937.4861003450947, - "25": -1881.7475544966392, - "50": -1170.6945714968547, - "75": -124.13671681902403, - "95": 1683.5400540223286, - "99": 3015.8060365193123, - "99.9": 3797.6599244161957 - } - }, - "f4b": { - "units": "A", - "source": "ptdata:F4B", - "description": "Shaping F-coil F4B current (bank B).", - "min": -5829.242194941551, - "max": 5787.149431930685, - "mean": 1124.2967529296875, - "std": 1519.5994873046875, - "pct": { - "0.1": -4083.976449898858, - "1": -3247.08251902718, - "5": -2270.942268479742, - "25": 376.8608226937906, - "50": 1392.450441038166, - "75": 2146.7001303629104, - "95": 3145.5476189867913, - "99": 3926.614817946318, - "99.9": 4582.551950710075 - } - }, - "f5b": { - "units": "A", - "source": "ptdata:F5B", - "description": "Shaping F-coil F5B current (bank B).", - "min": -5213.110339059254, - "max": 5388.213772287713, - "mean": 1443.536865234375, - "std": 1408.3306884765625, - "pct": { - "0.1": -4134.61747806435, - "1": -3056.873937432705, - "5": -1361.0988601293998, - "25": 675.1515533174199, - "50": 1572.802070225599, - "75": 2367.5452263604984, - "95": 3528.863240540377, - "99": 4411.454242162536, - "99.9": 4967.30642206674 - } - }, - "f6b": { - "units": "A", - "source": "ptdata:F6B", - "description": "Shaping F-coil F6B current (bank B).", - "min": -7604.653108484432, - "max": 7763.1261416792295, - "mean": -2463.248046875, - "std": 1836.4208984375, - "pct": { - "0.1": -6372.627428710043, - "1": -5251.4106280007745, - "5": -4318.157196234368, - "25": -3524.5849152058445, - "50": -2837.2759930056304, - "75": -2089.94465303326, - "95": 2871.6849973390945, - "99": 3948.010461650111, - "99.9": 4803.251616324593 - } - }, - "f7b": { - "units": "A", - "source": "ptdata:F7B", - "description": "Shaping F-coil F7B current (bank B).", - "min": -11380.254539563213, - "max": 9414.242772782009, - "mean": -2941.56005859375, - "std": 2510.1083984375, - "pct": { - "0.1": -9236.286164628174, - "1": -7962.01372128499, - "5": -6618.689743738845, - "25": -4397.68407591947, - "50": -3041.7944101983817, - "75": -2113.0768216001165, - "95": 2850.240503964187, - "99": 5238.131223534479, - "99.9": 6771.41582857779 - } - }, - "f8b": { - "units": "A", - "source": "ptdata:F8B", - "description": "Shaping F-coil F8B current (bank B).", - "min": -5834.457886045129, - "max": 5952.292180058913, - "mean": 1431.05615234375, - "std": 1718.2965087890625, - "pct": { - "0.1": -4377.886849186064, - "1": -3547.8568327724756, - "5": -2536.325388000092, - "25": 592.1441487378677, - "50": 1743.1741236182588, - "75": 2613.9050347435855, - "95": 3655.019608301406, - "99": 4295.252919476556, - "99.9": 5183.621783504976 - } - }, - "f9b": { - "units": "A", - "source": "ptdata:F9B", - "description": "Shaping F-coil F9B current (bank B).", - "min": -7298.33418485197, - "max": 8673.475372842513, - "mean": -214.02586364746094, - "std": 1388.83447265625, - "pct": { - "0.1": -4443.002941036773, - "1": -3335.961239603393, - "5": -2530.3434455144015, - "25": -1111.6205754278508, - "50": -212.41719832099042, - "75": 564.1401009862525, - "95": 2296.158459733251, - "99": 3401.023805016151, - "99.9": 4981.695296538042 - } - }, - "ecoila": { - "units": "A", - "source": "ptdata:ECOILA", - "description": "Ohmic E-coil bank A current.", - "min": -68526.67779690563, - "max": 65669.33446503483, - "mean": -6965.32666015625, - "std": 18940.9453125, - "pct": { - "0.1": -62521.0592220894, - "1": -53449.0677376177, - "5": -39610.65329064206, - "25": -19599.348704727538, - "50": -6887.604056684089, - "75": 6065.040591650557, - "95": 23926.96154448237, - "99": 33650.27142286909, - "99.9": 48164.54971213867 - } - }, - "ecoilb": { - "units": "A", - "source": "ptdata:ECOILB", - "description": "Ohmic E-coil bank B current.", - "min": -67880.78461590248, - "max": 67380.80764904841, - "mean": -6876.16455078125, - "std": 18723.662109375, - "pct": { - "0.1": -61839.528701402356, - "1": -52787.079189397904, - "5": -39153.2527665565, - "25": -19383.82435886666, - "50": -6768.996463787789, - "75": 6013.297288247475, - "95": 23686.641557508636, - "99": 33187.653018934754, - "99.9": 47362.43837391052 - } - }, - "gasa_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "description": "Calibrated gas injection flow, valve A.", - "min": -0.9805486760911233, - "max": 348.1779045740827, - "mean": 15.054444313049316, - "std": 26.369497299194336, - "pct": { - "0.1": -0.0181447514768128, - "1": 0.0006228885411054819, - "5": 0.0014589414841879034, - "25": 0.00852798057103854, - "50": 0.09974314587981326, - "75": 19.645558552678416, - "95": 71.02669389337856, - "99": 137.36341388263276, - "99.9": 211.79616738152396 - } - }, - "gasb_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "description": "Calibrated gas injection flow, valve B.", - "min": -0.5231055139632899, - "max": 317.69717326145866, - "mean": 1.386172890663147, - "std": 3.4090511798858643, - "pct": { - "0.1": 9.14047308575583e-06, - "1": 0.0007714573310613204, - "5": 0.002068321612864521, - "25": 0.009055124211873267, - "50": 0.07339015461169385, - "75": 1.9421402622606716, - "95": 1.9421402622606716, - "99": 23.663863921838843, - "99.9": 149.40068998150738 - } - }, - "gasc_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "description": "Calibrated gas injection flow, valve C.", - "min": -0.3965804467767108, - "max": 306.0269668007428, - "mean": 0.35034820437431335, - "std": 0.4470684826374054, - "pct": { - "0.1": 7.428448363699935e-05, - "1": 0.00026770734685732656, - "5": 0.0006667805693404416, - "25": 0.002788385500787083, - "50": 0.023577950502740697, - "75": 0.7508911827356307, - "95": 0.7508911827356307, - "99": 2.733332630282, - "99.9": 108.67323889612304 - } - }, - "gasd_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "description": "Calibrated gas injection flow, valve D.", - "min": -0.5287260135880842, - "max": 771.5043798529183, - "mean": 0.528103232383728, - "std": 0.654624342918396, - "pct": { - "0.1": 5.497087182604332e-05, - "1": 0.000175335120693898, - "5": 0.0005482846440516553, - "25": 0.003719433481388368, - "50": 0.08385269566973214, - "75": 1.0383906373403984, - "95": 1.0383906373403984, - "99": 4.359676988215197, - "99.9": 127.54440071212512 - } - }, - "gase_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "description": "Calibrated gas injection flow, valve E.", - "min": -0.2211384331710633, - "max": 672.8582070151267, - "mean": 0.27696067094802856, - "std": 0.17616958916187286, - "pct": { - "0.1": 0.00010156410138473793, - "1": 0.000223585566083373, - "5": 0.0005190716405260032, - "25": 0.011627604901727706, - "50": 0.3920832239686922, - "75": 0.3920832239686922, - "95": 0.3920832239686922, - "99": 0.3920832239686922, - "99.9": 29.75536079519976 - } - }, - "bt": { - "units": "T", - "source": "ptdata:bt", - "description": "Vacuum toroidal magnetic field (signed).", - "min": -2.2353815075115375, - "max": 2.25186423641397, - "mean": -0.971906840801239, - "std": 1.6484158039093018, - "pct": { - "0.1": -2.2151064134142304, - "1": -2.1819873443702726, - "5": -2.136304350652244, - "25": -2.0446028795017246, - "50": -1.8984274308309796, - "75": -1.0260122281948352, - "95": 2.053318112027725, - "99": 2.10945640328767, - "99.9": 2.1819705410137904 - } - } - } -} diff --git a/s6/fuse29_seq.onnx b/s6/fuse29_seq.onnx deleted file mode 100644 index 6ddb6dc3dcadca79ac8f6d59afd304b0b059a9f4..0000000000000000000000000000000000000000 --- a/s6/fuse29_seq.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ca3570ae8e579c638d9195f6f7e3c4634bc61425cc51c7998a53818cb8c18ddb -size 45464382 diff --git a/s6/fuse29_step.onnx b/s6/fuse29_step.onnx deleted file mode 100644 index 297761d69ebf55257e4df88e20afe9a2abfab646..0000000000000000000000000000000000000000 --- a/s6/fuse29_step.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:36b55e194e705e0a1d1087c1164e4f72f2507784b1210a0ce2f94fa151db04fa -size 45081271 diff --git a/s6/model_config.json b/s6/model_config.json deleted file mode 100644 index 79981ff09a62914e6f784a6ff8ec00adcfbe0307..0000000000000000000000000000000000000000 --- a/s6/model_config.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "schema_version": 1, - "model": "fuse29", - "seed": 6, - "description": "29-input Mamba-2 pedestal predictor for DIII-D. Strictly causal, 20 Hz, nine heads at rho_tor = 0.85.", - "architecture": { - "family": "Mamba-2 (structured state-space duality)", - "d_model": 512, - "n_layers": 6, - "d_state": 128, - "d_conv": 4, - "expand": 2, - "headdim": 128, - "nheads": 8, - "ngroups": 2, - "chunk_size": 100, - "d_inner": 1024, - "conv_dim": 1536, - "n_params": 11254425 - }, - "cadence": { - "hz": 20, - "period_ms": 50.0, - "rho_tor": 0.85 - }, - "inputs": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "n": 29, - "units": { - "pinj": "MW", - "tinj": "N*m", - "ech_total": "MW", - "f1a": "A", - "f2a": "A", - "f3a": "A", - "f4a": "A", - "f5a": "A", - "f6a": "A", - "f7a": "A", - "f8a": "A", - "f9a": "A", - "f1b": "A", - "f2b": "A", - "f3b": "A", - "f4b": "A", - "f5b": "A", - "f6b": "A", - "f7b": "A", - "f8b": "A", - "f9b": "A", - "ecoila": "A", - "ecoilb": "A", - "gasa_cal": "Torr*L/s", - "gasb_cal": "Torr*L/s", - "gasc_cal": "Torr*L/s", - "gasd_cal": "Torr*L/s", - "gase_cal": "Torr*L/s", - "bt": "T" - }, - "sources": { - "pinj": "ptdata:bmspinj", - "tinj": "ptdata:bmstinj", - "ech_total": "ptdata:ECHPWR", - "f1a": "ptdata:F1A", - "f2a": "ptdata:F2A", - "f3a": "ptdata:F3A", - "f4a": "ptdata:F4A", - "f5a": "ptdata:F5A", - "f6a": "ptdata:F6A", - "f7a": "ptdata:F7A", - "f8a": "ptdata:F8A", - "f9a": "ptdata:F9A", - "f1b": "ptdata:F1B", - "f2b": "ptdata:F2B", - "f3b": "ptdata:F3B", - "f4b": "ptdata:F4B", - "f5b": "ptdata:F5B", - "f6b": "ptdata:F6B", - "f7b": "ptdata:F7B", - "f8b": "ptdata:F8B", - "f9b": "ptdata:F9B", - "ecoila": "ptdata:ECOILA", - "ecoilb": "ptdata:ECOILB", - "gasa_cal": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "gasb_cal": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "gasc_cal": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "gasd_cal": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "gase_cal": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "bt": "ptdata:bt" - }, - "descriptions": { - "pinj": "Neutral beam injected power, all sources.", - "tinj": "Neutral beam injected torque, all sources.", - "ech_total": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "f1a": "Shaping F-coil F1A current (bank A).", - "f2a": "Shaping F-coil F2A current (bank A).", - "f3a": "Shaping F-coil F3A current (bank A).", - "f4a": "Shaping F-coil F4A current (bank A).", - "f5a": "Shaping F-coil F5A current (bank A).", - "f6a": "Shaping F-coil F6A current (bank A).", - "f7a": "Shaping F-coil F7A current (bank A).", - "f8a": "Shaping F-coil F8A current (bank A).", - "f9a": "Shaping F-coil F9A current (bank A).", - "f1b": "Shaping F-coil F1B current (bank B).", - "f2b": "Shaping F-coil F2B current (bank B).", - "f3b": "Shaping F-coil F3B current (bank B).", - "f4b": "Shaping F-coil F4B current (bank B).", - "f5b": "Shaping F-coil F5B current (bank B).", - "f6b": "Shaping F-coil F6B current (bank B).", - "f7b": "Shaping F-coil F7B current (bank B).", - "f8b": "Shaping F-coil F8B current (bank B).", - "f9b": "Shaping F-coil F9B current (bank B).", - "ecoila": "Ohmic E-coil bank A current.", - "ecoilb": "Ohmic E-coil bank B current.", - "gasa_cal": "Calibrated gas injection flow, valve A.", - "gasb_cal": "Calibrated gas injection flow, valve B.", - "gasc_cal": "Calibrated gas injection flow, valve C.", - "gasd_cal": "Calibrated gas injection flow, valve D.", - "gase_cal": "Calibrated gas injection flow, valve E.", - "bt": "Vacuum toroidal magnetic field (signed)." - }, - "space": "raw physical units; the graph applies the z-score", - "note": "Check your units against actuator_ranges.json before trusting any output. A unit error produces confident nonsense rather than an exception." - }, - "outputs": { - "names": [ - "ne", - "te_ped", - "ti_ped", - "t_rot_ped", - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc", - "hmode" - ], - "n": 9, - "units": { - "ne": "1e19 m^-3", - "te_ped": "keV", - "ti_ped": "keV", - "t_rot_ped": "krad/s", - "neped_prmtan": "1e19 m^-3", - "teped_prmtan": "keV", - "rho_sym": "rho_tor (dimensionless)", - "ne_top_loc": "rho_tor (dimensionless)", - "hmode": "probability in [0, 1]" - }, - "note": "Physical units. hmode is a probability in [0, 1]; the graph applies the sigmoid.", - "hmode_gated": { - "heads": [ - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc" - ], - "indices": [ - 4, - 5, - 6, - 7 - ], - "threshold": 0.5, - "note": "These four heads were trained only on H-mode rows and are undefined otherwise. The graph does NOT gate them; the consumer must, using the model's own hmode output. See docs/GATING.md." - } - }, - "graphs": { - "fuse29_step.onnx": { - "purpose": "real-time, one 50 ms tick per call", - "inputs": { - "actuators": [ - "batch", - 29 - ], - "conv_state": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "outputs": { - "predictions": [ - "batch", - 9 - ], - "conv_state_out": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state_out": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "initial_state": "all zeros at the start of a shot", - "max_shot_length": "unbounded" - }, - "fuse29_seq.onnx": { - "purpose": "offline scoring of a whole shot", - "inputs": { - "actuators": [ - "batch", - 256, - 29 - ] - }, - "outputs": { - "predictions": [ - "batch", - 256, - 9 - ] - }, - "seq_len": 256, - "note": "Sequence length is FIXED. Right-pad shorter shots with zeros and read the first T outputs; the model is strictly causal so this is exact. For longer shots use the step graph or re-export with --seq-len." - } - }, - "dtype": "float32", - "onnx_opset": 17, - "training": { - "epoch": 22, - "val_loss": 1.1161801163107157, - "note": "See docs/TRAINING.md for the full recipe." - } -} diff --git a/s6/norms.json b/s6/norms.json deleted file mode 100644 index 98c8c06209fd050ed78c21fa5b30afd95a71c171..0000000000000000000000000000000000000000 --- a/s6/norms.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "schema_version": 2, - "note": "Statistics are baked into the shipped ONNX graphs. This file is for inspection and for reproducing the transform outside the graph; it is not required at inference time.", - "actuator_space": "physical", - "std_floor": 1e-06, - "clip_sigma": 20.0, - "provenance": { - "split": "train", - "n_shots": 32731, - "rho_index": 85, - "source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85, random stratified split (split_index.json)", - "note": "Recomputed on the NEW random train split. The source shards carried z-scores from the OLD chronological train split, whose shots overlap our test set. Actuator statistics are winsorised so a corrupted sample cannot set a channel's divisor.", - "inflated_channels": [ - "pinj", - "gasc_cal", - "gasd_cal", - "gase_cal" - ], - "actuator_estimator": "winsorised to p1..p99", - "actuator_space": "physical", - "composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "composition": "z = (x_phys - (m1 + s1*m2)) / (s1*s2), where (m1, s1) is the upstream FPE z-score and (m2, s2) is this model's re-scale onto its own training split" - }, - "actuators": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "mean": [ - 3.838883638381958, - 2.2043209075927734, - 2.6981112957000732, - -1382.3704833984375, - -1229.876708984375, - -592.7352294921875, - 1098.1622314453125, - 1173.57958984375, - -2493.411865234375, - -2367.570556640625, - 996.0214233398438, - -535.8018798828125, - -1373.1888427734375, - -1218.50048828125, - -1005.3848266601562, - 1124.2967529296875, - 1443.536865234375, - -2463.248046875, - -2941.56005859375, - 1431.05615234375, - -214.02586364746094, - -6965.32666015625, - -6876.16455078125, - 15.054444313049316, - 1.386172890663147, - 0.35034820437431335, - 0.528103232383728, - 0.27696067094802856, - -0.971906840801239 - ], - "std": [ - 3.0613932609558105, - 2.11222505569458, - 6.685519218444824, - 1349.629638671875, - 1248.3497314453125, - 1185.706298828125, - 1368.95458984375, - 1352.103759765625, - 1867.8076171875, - 1999.19970703125, - 1498.948974609375, - 1258.01171875, - 1367.82275390625, - 1316.67724609375, - 1308.8258056640625, - 1519.5994873046875, - 1408.3306884765625, - 1836.4208984375, - 2510.1083984375, - 1718.2965087890625, - 1388.83447265625, - 18940.9453125, - 18723.662109375, - 26.369497299194336, - 3.4090511798858643, - 0.4470684826374054, - 0.654624342918396, - 0.17616958916187286, - 1.6484158039093018 - ], - "transform": "z = clip((x - mean) / std, -clip_sigma, +clip_sigma), applied inside the graph" - }, - "targets": { - "ne": { - "mean": 2.7511744499206543, - "std": 1.654153823852539 - }, - "te_ped": { - "mean": 0.5915626287460327, - "std": 0.43467429280281067 - }, - "ti_ped": { - "mean": 1.016850233078003, - "std": 0.681096076965332 - }, - "t_rot_ped": { - "mean": 21.244613647460938, - "std": 16.59148406982422 - }, - "neped_prmtan": { - "mean": 2.7231285572052, - "std": 1.7005536556243896 - }, - "teped_prmtan": { - "mean": 0.46375223994255066, - "std": 0.36919456720352173 - }, - "rho_sym": { - "mean": 0.9757616519927979, - "std": 0.04329206794500351 - }, - "ne_top_loc": { - "mean": 0.9261865019798279, - "std": 0.049897171556949615 - } - }, - "hmode": { - "transform": "sigmoid", - "note": "hmode is a logit in the trunk; the graph applies the sigmoid." - }, - "stages": { - "note": "The composed actuator statistics above are the product of these two. Shown for traceability; use the composed values.", - "stage1_physical_to_fpe_zscore": { - "mean": [ - 2.8111997039100878, - 2.154143940948575, - 2.159654935239209, - -1444.0438445123289, - -1315.1185221229061, - -639.741760304047, - 1172.4978680515835, - 1222.4970107268077, - -2488.8410961768263, - -2491.3739557685253, - 1050.107386405324, - -578.9736547563273, - -1421.0817159358041, - -1285.3967398730092, - -1061.0290851406676, - 1186.4795970820587, - 1460.6822372728345, - -2452.093120847959, - -3071.3132492215186, - 1531.3304960724108, - -262.6728625067526, - -6887.604056684089, - -6768.996463787789, - 14.89178144369171, - 1.9421402622606716, - 0.7508911827356307, - 1.0383906373403984, - 0.3920832239686922, - -1.0310375752078498 - ], - "std": [ - 194.08418888726106, - 2.3684465859740262, - 5.948083564785035, - 1267.4907621702682, - 1217.4478106828162, - 1249.3915272640536, - 1345.3871181128568, - 1359.1934832307923, - 1887.1891497052302, - 1888.1014577442652, - 1559.9875106371376, - 1287.2118470203372, - 1271.813282654729, - 1259.8644805335082, - 1361.9306367877398, - 1521.172083160852, - 1393.2120473032558, - 1856.723912629122, - 2432.8530409799628, - 1705.6959050005082, - 1421.8036451037203, - 19092.148992270486, - 18858.28389193975, - 27.289184462156058, - 11.092415079529571, - 9.017289768908354, - 12.055982101097918, - 6.498888909025979, - 1.599000778986496 - ] - }, - "stage2_fpe_zscore_to_model": { - "mean": [ - 0.0052950419485569, - 0.02118559367954731, - 0.0905260294675827, - 0.04865782707929611, - 0.0700167864561081, - 0.03762352466583252, - -0.05525219440460205, - -0.03599006310105324, - -0.002421961398795247, - 0.06557027250528336, - -0.03467077016830444, - 0.03353898227214813, - 0.03765711933374405, - 0.05309795215725899, - 0.040856875479221344, - -0.04087827727198601, - -0.012306398712098598, - -0.006007813848555088, - 0.05333370715379715, - -0.05878793075680733, - 0.03421499580144882, - -0.004070908762514591, - -0.00568280229344964, - 0.005960696842521429, - -0.050121404230594635, - -0.04441944137215614, - -0.042326491326093674, - -0.017714189365506172, - 0.036979787051677704 - ], - "std": [ - 0.015773532912135124, - 0.8918187022209167, - 1.1239787340164185, - 1.0648043155670166, - 1.0253825187683105, - 0.9490270018577576, - 1.0175172090530396, - 0.994783878326416, - 0.9897299408912659, - 1.0588412284851074, - 0.9608724117279053, - 0.9773152470588684, - 1.0754902362823486, - 1.04509437084198, - 0.9610077142715454, - 0.9989661574363708, - 1.0108516216278076, - 0.9890651702880859, - 1.0317550897598267, - 1.007387399673462, - 0.9768117070198059, - 0.9920803308486938, - 0.9928614497184753, - 0.9662984609603882, - 0.30733174085617065, - 0.04957903176546097, - 0.05429871752858162, - 0.02710764855146408, - 1.030903697013855 - ] - } - } -} diff --git a/s6/provenance.json b/s6/provenance.json deleted file mode 100644 index 1687b502262e61fa28960a4c3b28f66fdcd0762d..0000000000000000000000000000000000000000 --- a/s6/provenance.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "schema_version": 1, - "exported_utc": "2026-09-03T00:46:38.050137+00:00", - "seed": 6, - "source_checkpoint": "/flare/fusiondl_aesp/fuse_bd_model/fuse20/runs/fuse29r_s6/best_model.pt", - "source_checkpoint_sha256": "97dfda0fd4b6694275e532ce13555ffa1d3eba6b0cd4d0152d770465bc4cab79", - "norms_source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json", - "norms_actuator_space": "physical", - "norms_composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "onnx_opset": 17, - "exporter": "torch.onnx.export (TorchScript, dynamo=False)", - "versions": { - "torch": "2.10.0a0+git449b176", - "python": "3.12.12", - "platform": "Linux-5.14.21-150400.24.235-default-x86_64-with-glibc2.31", - "onnx": "1.22.0", - "onnxruntime": "1.29.0" - }, - "artifacts": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "36b55e194e705e0a1d1087c1164e4f72f2507784b1210a0ce2f94fa151db04fa" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "ca3570ae8e579c638d9195f6f7e3c4634bc61425cc51c7998a53818cb8c18ddb" - } - } -} diff --git a/s7/README.md b/s7/README.md deleted file mode 100644 index 8889834bfce2ad9e08a27721981325cd88abd11c..0000000000000000000000000000000000000000 --- a/s7/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -license: mit -library_name: onnx -tags: - - onnx - - fusion - - plasma-physics - - tokamak - - diii-d - - mamba ---- - -# fuse29 — seed 7 - -This is seed 7, one of eight independently trained runs. Seed 0 is the champion and the default; this one exists so you can measure spread across training runs. Unless you are doing that, you want seed 0. - -29-input Mamba-2 pedestal predictor for DIII-D. Raw physical units in, -physical units out. See the [root model card](https://huggingface.co/SCS-Lab/FUSE29-Pedestal-model) -for the full description, I/O contract, accuracy and limitations. - -| | | -|---|---| -| Seed | 7 | -| Parameters | 11,254,425 | -| Best validation loss | 1.1130 | -| Sequence graph length | 256 ticks | -| ONNX opset | 17 | -| Exported | 2026-09-03T00:46:41.200737+00:00 | -| Source checkpoint SHA-256 | `de45313df2c4b1c4…` | - -## Load - -```python -from fuse29.runtime import Fuse29Predictor - -predictor = Fuse29Predictor.from_pretrained("SCS-Lab/FUSE29-Pedestal-model", seed=7) -``` - -## Files - -| File | | -|---|---| -| `fuse29_step.onnx` | one 50 ms tick, carries state, no length limit | -| `fuse29_seq.onnx` | whole shot at a fixed 256 ticks | -| `model_config.json` | I/O contract: names, order, units, sources, shapes | -| `norms.json` | the statistics baked into the graphs | -| `actuator_ranges.json` | training-split distribution, for checking your units | -| `provenance.json` | source checkpoint hash, library versions, artefact hashes | - -## Before you use it - -- Four heads (`neped_prmtan`, `teped_prmtan`, `rho_sym`, `ne_top_loc`) are - **only valid in H-mode** and the graph does not gate them. Gate on the - model's own `hmode` output. -- `pinj` is in **MW**, not W. Run `predictor.check_units(shot)` once. -- Output column order is not alphabetical. See `model_config.json`. diff --git a/s7/actuator_ranges.json b/s7/actuator_ranges.json deleted file mode 100644 index 08d19f4e80f49e6bbd18c40674b06946a02cc61a..0000000000000000000000000000000000000000 --- a/s7/actuator_ranges.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "schema_version": 1, - "note": "Physical-units distribution of each actuator over the training split. Use it to check that your signals are in the units the graph expects; a unit error is the one preprocessing mistake that produces confident nonsense rather than an exception.", - "split": "train", - "n_shots": 32731, - "n_ticks": 3020926, - "percentiles": [ - 0.1, - 1, - 5, - 25, - 50, - 75, - 95, - 99, - 99.9 - ], - "channels": { - "pinj": { - "units": "MW", - "source": "ptdata:bmspinj", - "description": "Neutral beam injected power, all sources.", - "min": -46005.02701919088, - "max": 17.512712760455507, - "mean": 3.838883638381958, - "std": 3.0613932609558105, - "pct": { - "0.1": -0.004132416388869853, - "1": 4.112187479421436e-09, - "5": 4.112187479421436e-09, - "25": 1.311169336894574, - "50": 3.18466408866965, - "75": 5.748764762873332, - "95": 9.841882532311711, - "99": 12.212702351352696, - "99.9": 14.791924355083399 - } - }, - "tinj": { - "units": "N*m", - "source": "ptdata:bmstinj", - "description": "Neutral beam injected torque, all sources.", - "min": -56.644382966354534, - "max": 129.9833380295058, - "mean": 2.2043209075927734, - "std": 2.11222505569458, - "pct": { - "0.1": -2.0636791725994676, - "1": -0.5384317586520496, - "5": -1.6338495756329507e-07, - "25": 0.4319133403840452, - "50": 1.963846077087278, - "75": 3.1821234334199193, - "95": 6.641525317445799, - "99": 8.941231792062355, - "99.9": 11.156712776956862 - } - }, - "ech_total": { - "units": "MW", - "source": "ptdata:ECHPWR", - "description": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "min": -19.31181996542309, - "max": 40.286455582885246, - "mean": 2.6981112957000732, - "std": 6.685519218444824, - "pct": { - "0.1": -1.0663586061709935, - "1": -0.09982622583332723, - "5": -0.020836448436920674, - "25": -3.2566890961760464e-08, - "50": -3.2566890961760464e-08, - "75": 1.1717011943616973, - "95": 21.558252060431304, - "99": 30.476182922859127, - "99.9": 37.09168917133024 - } - }, - "f1a": { - "units": "A", - "source": "ptdata:F1A", - "description": "Shaping F-coil F1A current (bank A).", - "min": -5776.925892871883, - "max": 5794.3504737288395, - "mean": -1382.3704833984375, - "std": 1349.629638671875, - "pct": { - "0.1": -4852.691808601986, - "1": -4131.456225748339, - "5": -3401.8604035239678, - "25": -2236.4754469921672, - "50": -1501.5458201268116, - "75": -660.4245966463927, - "95": 1294.4315819071094, - "99": 3103.250955923345, - "99.9": 4467.289606367005 - } - }, - "f2a": { - "units": "A", - "source": "ptdata:F2A", - "description": "Shaping F-coil F2A current (bank A).", - "min": -5716.347659616551, - "max": 5702.840977614059, - "mean": -1229.876708984375, - "std": 1248.3497314453125, - "pct": { - "0.1": -4093.397230708888, - "1": -3297.8668360449756, - "5": -2712.522533155646, - "25": -2004.455454331444, - "50": -1443.842241803098, - "75": -854.5004209979342, - "95": 1825.579117167513, - "99": 3097.0902901803724, - "99.9": 3899.548655232026 - } - }, - "f3a": { - "units": "A", - "source": "ptdata:F3A", - "description": "Shaping F-coil F3A current (bank A).", - "min": -5498.272347966228, - "max": 5321.719922394657, - "mean": -592.7352294921875, - "std": 1185.706298828125, - "pct": { - "0.1": -4140.690909683277, - "1": -3539.2136012211317, - "5": -2813.2888996278725, - "25": -1377.7435033975407, - "50": -152.16189816331342, - "75": 2.4453898354848604, - "95": 1203.107532773337, - "99": 2898.3184344684487, - "99.9": 3780.0556837479485 - } - }, - "f4a": { - "units": "A", - "source": "ptdata:F4A", - "description": "Shaping F-coil F4A current (bank A).", - "min": -5876.373800845117, - "max": 5855.700219305917, - "mean": 1098.1622314453125, - "std": 1368.95458984375, - "pct": { - "0.1": -4331.218505807293, - "1": -3344.4526378786877, - "5": -1858.4157962413597, - "25": 395.84891116184133, - "50": 1143.436262581068, - "75": 1990.2677717095535, - "95": 3141.5448401142426, - "99": 3756.430079500399, - "99.9": 4525.754910416766 - } - }, - "f5a": { - "units": "A", - "source": "ptdata:F5A", - "description": "Shaping F-coil F5A current (bank A).", - "min": -5178.8539079385355, - "max": 5353.141466672798, - "mean": 1173.57958984375, - "std": 1352.103759765625, - "pct": { - "0.1": -4592.7059148331355, - "1": -3597.7201189044818, - "5": -1551.4942446467403, - "25": 543.836095032849, - "50": 1273.969119983141, - "75": 2051.0443148459794, - "95": 3019.669622905384, - "99": 3875.454685744494, - "99.9": 4738.506855960392 - } - }, - "f6a": { - "units": "A", - "source": "ptdata:F6A", - "description": "Shaping F-coil F6A current (bank A).", - "min": -7929.903731492232, - "max": 5741.056818467809, - "mean": -2493.411865234375, - "std": 1867.8076171875, - "pct": { - "0.1": -6125.90268588119, - "1": -4963.398523516425, - "5": -4319.477588996284, - "25": -3574.8234234024885, - "50": -2898.635802832382, - "75": -2143.0930801744807, - "95": 2999.75903843203, - "99": 4137.6543157735705, - "99.9": 4783.375582166487 - } - }, - "f7a": { - "units": "A", - "source": "ptdata:F7A", - "description": "Shaping F-coil F7A current (bank A).", - "min": -9825.736080045011, - "max": 8678.484606762057, - "mean": -2367.570556640625, - "std": 1999.19970703125, - "pct": { - "0.1": -7676.219824168618, - "1": -6127.379912259545, - "5": -4909.893927511103, - "25": -3430.1309476786882, - "50": -2697.460342263373, - "75": -1913.0579478721388, - "95": 2723.164038733837, - "99": 3948.221013655396, - "99.9": 5316.086800760559 - } - }, - "f8a": { - "units": "A", - "source": "ptdata:F8A", - "description": "Shaping F-coil F8A current (bank A).", - "min": -5378.835169240788, - "max": 5880.767402237174, - "mean": 996.0214233398438, - "std": 1498.948974609375, - "pct": { - "0.1": -4229.744640827867, - "1": -3363.368412210415, - "5": -1922.2114690963926, - "25": 60.761390529545906, - "50": 1153.9241798399726, - "75": 1951.1572686642544, - "95": 3318.078493605748, - "99": 3973.7764489149104, - "99.9": 4670.296725684707 - } - }, - "f9a": { - "units": "A", - "source": "ptdata:F9A", - "description": "Shaping F-coil F9A current (bank A).", - "min": -7206.032812499594, - "max": 8700.684616308497, - "mean": -535.8018798828125, - "std": 1258.01171875, - "pct": { - "0.1": -4739.927394914494, - "1": -3344.557163847978, - "5": -2567.420669960383, - "25": -1538.6304412830955, - "50": -578.9736547563273, - "75": 353.08467764596537, - "95": 1558.2607279613098, - "99": 2657.691791383836, - "99.9": 4334.930796170508 - } - }, - "f1b": { - "units": "A", - "source": "ptdata:F1B", - "description": "Shaping F-coil F1B current (bank B).", - "min": -5921.943154546981, - "max": 5407.326196618229, - "mean": -1373.1888427734375, - "std": 1367.82275390625, - "pct": { - "0.1": -5179.567735964654, - "1": -4339.478258925401, - "5": -3463.431883510691, - "25": -2205.922070942479, - "50": -1459.5306304510002, - "75": -750.1948036110768, - "95": 1428.796834935177, - "99": 3233.0438718527407, - "99.9": 4240.724502122051 - } - }, - "f2b": { - "units": "A", - "source": "ptdata:F2B", - "description": "Shaping F-coil F2B current (bank B).", - "min": -5788.286812358208, - "max": 5428.562849130928, - "mean": -1218.50048828125, - "std": 1316.67724609375, - "pct": { - "0.1": -4785.998935671587, - "1": -3520.521383204173, - "5": -2855.1671089762676, - "25": -1969.483606794242, - "50": -1447.1879016413761, - "75": -866.6265611311096, - "95": 2049.217650390811, - "99": 3312.4349928765846, - "99.9": 4011.5142868858347 - } - }, - "f3b": { - "units": "A", - "source": "ptdata:F3B", - "description": "Shaping F-coil F3B current (bank B).", - "min": -5503.943071765381, - "max": 4849.177948074737, - "mean": -1005.3848266601562, - "std": 1308.8258056640625, - "pct": { - "0.1": -4452.6277480541985, - "1": -3641.634707712471, - "5": -2937.4861003450947, - "25": -1881.7475544966392, - "50": -1170.6945714968547, - "75": -124.13671681902403, - "95": 1683.5400540223286, - "99": 3015.8060365193123, - "99.9": 3797.6599244161957 - } - }, - "f4b": { - "units": "A", - "source": "ptdata:F4B", - "description": "Shaping F-coil F4B current (bank B).", - "min": -5829.242194941551, - "max": 5787.149431930685, - "mean": 1124.2967529296875, - "std": 1519.5994873046875, - "pct": { - "0.1": -4083.976449898858, - "1": -3247.08251902718, - "5": -2270.942268479742, - "25": 376.8608226937906, - "50": 1392.450441038166, - "75": 2146.7001303629104, - "95": 3145.5476189867913, - "99": 3926.614817946318, - "99.9": 4582.551950710075 - } - }, - "f5b": { - "units": "A", - "source": "ptdata:F5B", - "description": "Shaping F-coil F5B current (bank B).", - "min": -5213.110339059254, - "max": 5388.213772287713, - "mean": 1443.536865234375, - "std": 1408.3306884765625, - "pct": { - "0.1": -4134.61747806435, - "1": -3056.873937432705, - "5": -1361.0988601293998, - "25": 675.1515533174199, - "50": 1572.802070225599, - "75": 2367.5452263604984, - "95": 3528.863240540377, - "99": 4411.454242162536, - "99.9": 4967.30642206674 - } - }, - "f6b": { - "units": "A", - "source": "ptdata:F6B", - "description": "Shaping F-coil F6B current (bank B).", - "min": -7604.653108484432, - "max": 7763.1261416792295, - "mean": -2463.248046875, - "std": 1836.4208984375, - "pct": { - "0.1": -6372.627428710043, - "1": -5251.4106280007745, - "5": -4318.157196234368, - "25": -3524.5849152058445, - "50": -2837.2759930056304, - "75": -2089.94465303326, - "95": 2871.6849973390945, - "99": 3948.010461650111, - "99.9": 4803.251616324593 - } - }, - "f7b": { - "units": "A", - "source": "ptdata:F7B", - "description": "Shaping F-coil F7B current (bank B).", - "min": -11380.254539563213, - "max": 9414.242772782009, - "mean": -2941.56005859375, - "std": 2510.1083984375, - "pct": { - "0.1": -9236.286164628174, - "1": -7962.01372128499, - "5": -6618.689743738845, - "25": -4397.68407591947, - "50": -3041.7944101983817, - "75": -2113.0768216001165, - "95": 2850.240503964187, - "99": 5238.131223534479, - "99.9": 6771.41582857779 - } - }, - "f8b": { - "units": "A", - "source": "ptdata:F8B", - "description": "Shaping F-coil F8B current (bank B).", - "min": -5834.457886045129, - "max": 5952.292180058913, - "mean": 1431.05615234375, - "std": 1718.2965087890625, - "pct": { - "0.1": -4377.886849186064, - "1": -3547.8568327724756, - "5": -2536.325388000092, - "25": 592.1441487378677, - "50": 1743.1741236182588, - "75": 2613.9050347435855, - "95": 3655.019608301406, - "99": 4295.252919476556, - "99.9": 5183.621783504976 - } - }, - "f9b": { - "units": "A", - "source": "ptdata:F9B", - "description": "Shaping F-coil F9B current (bank B).", - "min": -7298.33418485197, - "max": 8673.475372842513, - "mean": -214.02586364746094, - "std": 1388.83447265625, - "pct": { - "0.1": -4443.002941036773, - "1": -3335.961239603393, - "5": -2530.3434455144015, - "25": -1111.6205754278508, - "50": -212.41719832099042, - "75": 564.1401009862525, - "95": 2296.158459733251, - "99": 3401.023805016151, - "99.9": 4981.695296538042 - } - }, - "ecoila": { - "units": "A", - "source": "ptdata:ECOILA", - "description": "Ohmic E-coil bank A current.", - "min": -68526.67779690563, - "max": 65669.33446503483, - "mean": -6965.32666015625, - "std": 18940.9453125, - "pct": { - "0.1": -62521.0592220894, - "1": -53449.0677376177, - "5": -39610.65329064206, - "25": -19599.348704727538, - "50": -6887.604056684089, - "75": 6065.040591650557, - "95": 23926.96154448237, - "99": 33650.27142286909, - "99.9": 48164.54971213867 - } - }, - "ecoilb": { - "units": "A", - "source": "ptdata:ECOILB", - "description": "Ohmic E-coil bank B current.", - "min": -67880.78461590248, - "max": 67380.80764904841, - "mean": -6876.16455078125, - "std": 18723.662109375, - "pct": { - "0.1": -61839.528701402356, - "1": -52787.079189397904, - "5": -39153.2527665565, - "25": -19383.82435886666, - "50": -6768.996463787789, - "75": 6013.297288247475, - "95": 23686.641557508636, - "99": 33187.653018934754, - "99.9": 47362.43837391052 - } - }, - "gasa_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "description": "Calibrated gas injection flow, valve A.", - "min": -0.9805486760911233, - "max": 348.1779045740827, - "mean": 15.054444313049316, - "std": 26.369497299194336, - "pct": { - "0.1": -0.0181447514768128, - "1": 0.0006228885411054819, - "5": 0.0014589414841879034, - "25": 0.00852798057103854, - "50": 0.09974314587981326, - "75": 19.645558552678416, - "95": 71.02669389337856, - "99": 137.36341388263276, - "99.9": 211.79616738152396 - } - }, - "gasb_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "description": "Calibrated gas injection flow, valve B.", - "min": -0.5231055139632899, - "max": 317.69717326145866, - "mean": 1.386172890663147, - "std": 3.4090511798858643, - "pct": { - "0.1": 9.14047308575583e-06, - "1": 0.0007714573310613204, - "5": 0.002068321612864521, - "25": 0.009055124211873267, - "50": 0.07339015461169385, - "75": 1.9421402622606716, - "95": 1.9421402622606716, - "99": 23.663863921838843, - "99.9": 149.40068998150738 - } - }, - "gasc_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "description": "Calibrated gas injection flow, valve C.", - "min": -0.3965804467767108, - "max": 306.0269668007428, - "mean": 0.35034820437431335, - "std": 0.4470684826374054, - "pct": { - "0.1": 7.428448363699935e-05, - "1": 0.00026770734685732656, - "5": 0.0006667805693404416, - "25": 0.002788385500787083, - "50": 0.023577950502740697, - "75": 0.7508911827356307, - "95": 0.7508911827356307, - "99": 2.733332630282, - "99.9": 108.67323889612304 - } - }, - "gasd_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "description": "Calibrated gas injection flow, valve D.", - "min": -0.5287260135880842, - "max": 771.5043798529183, - "mean": 0.528103232383728, - "std": 0.654624342918396, - "pct": { - "0.1": 5.497087182604332e-05, - "1": 0.000175335120693898, - "5": 0.0005482846440516553, - "25": 0.003719433481388368, - "50": 0.08385269566973214, - "75": 1.0383906373403984, - "95": 1.0383906373403984, - "99": 4.359676988215197, - "99.9": 127.54440071212512 - } - }, - "gase_cal": { - "units": "Torr*L/s", - "source": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "description": "Calibrated gas injection flow, valve E.", - "min": -0.2211384331710633, - "max": 672.8582070151267, - "mean": 0.27696067094802856, - "std": 0.17616958916187286, - "pct": { - "0.1": 0.00010156410138473793, - "1": 0.000223585566083373, - "5": 0.0005190716405260032, - "25": 0.011627604901727706, - "50": 0.3920832239686922, - "75": 0.3920832239686922, - "95": 0.3920832239686922, - "99": 0.3920832239686922, - "99.9": 29.75536079519976 - } - }, - "bt": { - "units": "T", - "source": "ptdata:bt", - "description": "Vacuum toroidal magnetic field (signed).", - "min": -2.2353815075115375, - "max": 2.25186423641397, - "mean": -0.971906840801239, - "std": 1.6484158039093018, - "pct": { - "0.1": -2.2151064134142304, - "1": -2.1819873443702726, - "5": -2.136304350652244, - "25": -2.0446028795017246, - "50": -1.8984274308309796, - "75": -1.0260122281948352, - "95": 2.053318112027725, - "99": 2.10945640328767, - "99.9": 2.1819705410137904 - } - } - } -} diff --git a/s7/fuse29_seq.onnx b/s7/fuse29_seq.onnx deleted file mode 100644 index f377869ecb6eb656b267de7e60a9b55e36814218..0000000000000000000000000000000000000000 --- a/s7/fuse29_seq.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:db040b029538d47b404e9864538fb0c550285081ecce7348ad6fd231fdd7bbcf -size 45464382 diff --git a/s7/fuse29_step.onnx b/s7/fuse29_step.onnx deleted file mode 100644 index 76f60b9b18487d888c1a97ba379765ac7cdf4536..0000000000000000000000000000000000000000 --- a/s7/fuse29_step.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:abf72130ad644f7bf2883c39f336536ad839ae7f609cc88d28a5366459e1693c -size 45081271 diff --git a/s7/model_config.json b/s7/model_config.json deleted file mode 100644 index 7892bb70d343b25769899d1fce0b9586a64b5306..0000000000000000000000000000000000000000 --- a/s7/model_config.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "schema_version": 1, - "model": "fuse29", - "seed": 7, - "description": "29-input Mamba-2 pedestal predictor for DIII-D. Strictly causal, 20 Hz, nine heads at rho_tor = 0.85.", - "architecture": { - "family": "Mamba-2 (structured state-space duality)", - "d_model": 512, - "n_layers": 6, - "d_state": 128, - "d_conv": 4, - "expand": 2, - "headdim": 128, - "nheads": 8, - "ngroups": 2, - "chunk_size": 100, - "d_inner": 1024, - "conv_dim": 1536, - "n_params": 11254425 - }, - "cadence": { - "hz": 20, - "period_ms": 50.0, - "rho_tor": 0.85 - }, - "inputs": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "n": 29, - "units": { - "pinj": "MW", - "tinj": "N*m", - "ech_total": "MW", - "f1a": "A", - "f2a": "A", - "f3a": "A", - "f4a": "A", - "f5a": "A", - "f6a": "A", - "f7a": "A", - "f8a": "A", - "f9a": "A", - "f1b": "A", - "f2b": "A", - "f3b": "A", - "f4b": "A", - "f5b": "A", - "f6b": "A", - "f7b": "A", - "f8b": "A", - "f9b": "A", - "ecoila": "A", - "ecoilb": "A", - "gasa_cal": "Torr*L/s", - "gasb_cal": "Torr*L/s", - "gasc_cal": "Torr*L/s", - "gasd_cal": "Torr*L/s", - "gase_cal": "Torr*L/s", - "bt": "T" - }, - "sources": { - "pinj": "ptdata:bmspinj", - "tinj": "ptdata:bmstinj", - "ech_total": "ptdata:ECHPWR", - "f1a": "ptdata:F1A", - "f2a": "ptdata:F2A", - "f3a": "ptdata:F3A", - "f4a": "ptdata:F4A", - "f5a": "ptdata:F5A", - "f6a": "ptdata:F6A", - "f7a": "ptdata:F7A", - "f8a": "ptdata:F8A", - "f9a": "ptdata:F9A", - "f1b": "ptdata:F1B", - "f2b": "ptdata:F2B", - "f3b": "ptdata:F3B", - "f4b": "ptdata:F4B", - "f5b": "ptdata:F5B", - "f6b": "ptdata:F6B", - "f7b": "ptdata:F7B", - "f8b": "ptdata:F8B", - "f9b": "ptdata:F9B", - "ecoila": "ptdata:ECOILA", - "ecoilb": "ptdata:ECOILB", - "gasa_cal": "tree:NEUTRALS GASFLOW.GASA:FLOW", - "gasb_cal": "tree:NEUTRALS GASFLOW.GASB:FLOW", - "gasc_cal": "tree:NEUTRALS GASFLOW.GASC:FLOW", - "gasd_cal": "tree:NEUTRALS GASFLOW.GASD:FLOW", - "gase_cal": "tree:NEUTRALS GASFLOW.GASE:FLOW", - "bt": "ptdata:bt" - }, - "descriptions": { - "pinj": "Neutral beam injected power, all sources.", - "tinj": "Neutral beam injected torque, all sources.", - "ech_total": "Total electron cyclotron heating power (see note in docs/PREPROCESSING.md on this channel's scaling).", - "f1a": "Shaping F-coil F1A current (bank A).", - "f2a": "Shaping F-coil F2A current (bank A).", - "f3a": "Shaping F-coil F3A current (bank A).", - "f4a": "Shaping F-coil F4A current (bank A).", - "f5a": "Shaping F-coil F5A current (bank A).", - "f6a": "Shaping F-coil F6A current (bank A).", - "f7a": "Shaping F-coil F7A current (bank A).", - "f8a": "Shaping F-coil F8A current (bank A).", - "f9a": "Shaping F-coil F9A current (bank A).", - "f1b": "Shaping F-coil F1B current (bank B).", - "f2b": "Shaping F-coil F2B current (bank B).", - "f3b": "Shaping F-coil F3B current (bank B).", - "f4b": "Shaping F-coil F4B current (bank B).", - "f5b": "Shaping F-coil F5B current (bank B).", - "f6b": "Shaping F-coil F6B current (bank B).", - "f7b": "Shaping F-coil F7B current (bank B).", - "f8b": "Shaping F-coil F8B current (bank B).", - "f9b": "Shaping F-coil F9B current (bank B).", - "ecoila": "Ohmic E-coil bank A current.", - "ecoilb": "Ohmic E-coil bank B current.", - "gasa_cal": "Calibrated gas injection flow, valve A.", - "gasb_cal": "Calibrated gas injection flow, valve B.", - "gasc_cal": "Calibrated gas injection flow, valve C.", - "gasd_cal": "Calibrated gas injection flow, valve D.", - "gase_cal": "Calibrated gas injection flow, valve E.", - "bt": "Vacuum toroidal magnetic field (signed)." - }, - "space": "raw physical units; the graph applies the z-score", - "note": "Check your units against actuator_ranges.json before trusting any output. A unit error produces confident nonsense rather than an exception." - }, - "outputs": { - "names": [ - "ne", - "te_ped", - "ti_ped", - "t_rot_ped", - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc", - "hmode" - ], - "n": 9, - "units": { - "ne": "1e19 m^-3", - "te_ped": "keV", - "ti_ped": "keV", - "t_rot_ped": "krad/s", - "neped_prmtan": "1e19 m^-3", - "teped_prmtan": "keV", - "rho_sym": "rho_tor (dimensionless)", - "ne_top_loc": "rho_tor (dimensionless)", - "hmode": "probability in [0, 1]" - }, - "note": "Physical units. hmode is a probability in [0, 1]; the graph applies the sigmoid.", - "hmode_gated": { - "heads": [ - "neped_prmtan", - "teped_prmtan", - "rho_sym", - "ne_top_loc" - ], - "indices": [ - 4, - 5, - 6, - 7 - ], - "threshold": 0.5, - "note": "These four heads were trained only on H-mode rows and are undefined otherwise. The graph does NOT gate them; the consumer must, using the model's own hmode output. See docs/GATING.md." - } - }, - "graphs": { - "fuse29_step.onnx": { - "purpose": "real-time, one 50 ms tick per call", - "inputs": { - "actuators": [ - "batch", - 29 - ], - "conv_state": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "outputs": { - "predictions": [ - "batch", - 9 - ], - "conv_state_out": [ - 6, - "batch", - 1536, - 3 - ], - "ssm_state_out": [ - 6, - "batch", - 8, - 128, - 128 - ] - }, - "initial_state": "all zeros at the start of a shot", - "max_shot_length": "unbounded" - }, - "fuse29_seq.onnx": { - "purpose": "offline scoring of a whole shot", - "inputs": { - "actuators": [ - "batch", - 256, - 29 - ] - }, - "outputs": { - "predictions": [ - "batch", - 256, - 9 - ] - }, - "seq_len": 256, - "note": "Sequence length is FIXED. Right-pad shorter shots with zeros and read the first T outputs; the model is strictly causal so this is exact. For longer shots use the step graph or re-export with --seq-len." - } - }, - "dtype": "float32", - "onnx_opset": 17, - "training": { - "epoch": 19, - "val_loss": 1.112956801429391, - "note": "See docs/TRAINING.md for the full recipe." - } -} diff --git a/s7/norms.json b/s7/norms.json deleted file mode 100644 index 98c8c06209fd050ed78c21fa5b30afd95a71c171..0000000000000000000000000000000000000000 --- a/s7/norms.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "schema_version": 2, - "note": "Statistics are baked into the shipped ONNX graphs. This file is for inspection and for reproducing the transform outside the graph; it is not required at inference time.", - "actuator_space": "physical", - "std_floor": 1e-06, - "clip_sigma": 20.0, - "provenance": { - "split": "train", - "n_shots": 32731, - "rho_index": 85, - "source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85, random stratified split (split_index.json)", - "note": "Recomputed on the NEW random train split. The source shards carried z-scores from the OLD chronological train split, whose shots overlap our test set. Actuator statistics are winsorised so a corrupted sample cannot set a channel's divisor.", - "inflated_channels": [ - "pinj", - "gasc_cal", - "gasd_cal", - "gase_cal" - ], - "actuator_estimator": "winsorised to p1..p99", - "actuator_space": "physical", - "composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "composition": "z = (x_phys - (m1 + s1*m2)) / (s1*s2), where (m1, s1) is the upstream FPE z-score and (m2, s2) is this model's re-scale onto its own training split" - }, - "actuators": { - "names": [ - "pinj", - "tinj", - "ech_total", - "f1a", - "f2a", - "f3a", - "f4a", - "f5a", - "f6a", - "f7a", - "f8a", - "f9a", - "f1b", - "f2b", - "f3b", - "f4b", - "f5b", - "f6b", - "f7b", - "f8b", - "f9b", - "ecoila", - "ecoilb", - "gasa_cal", - "gasb_cal", - "gasc_cal", - "gasd_cal", - "gase_cal", - "bt" - ], - "mean": [ - 3.838883638381958, - 2.2043209075927734, - 2.6981112957000732, - -1382.3704833984375, - -1229.876708984375, - -592.7352294921875, - 1098.1622314453125, - 1173.57958984375, - -2493.411865234375, - -2367.570556640625, - 996.0214233398438, - -535.8018798828125, - -1373.1888427734375, - -1218.50048828125, - -1005.3848266601562, - 1124.2967529296875, - 1443.536865234375, - -2463.248046875, - -2941.56005859375, - 1431.05615234375, - -214.02586364746094, - -6965.32666015625, - -6876.16455078125, - 15.054444313049316, - 1.386172890663147, - 0.35034820437431335, - 0.528103232383728, - 0.27696067094802856, - -0.971906840801239 - ], - "std": [ - 3.0613932609558105, - 2.11222505569458, - 6.685519218444824, - 1349.629638671875, - 1248.3497314453125, - 1185.706298828125, - 1368.95458984375, - 1352.103759765625, - 1867.8076171875, - 1999.19970703125, - 1498.948974609375, - 1258.01171875, - 1367.82275390625, - 1316.67724609375, - 1308.8258056640625, - 1519.5994873046875, - 1408.3306884765625, - 1836.4208984375, - 2510.1083984375, - 1718.2965087890625, - 1388.83447265625, - 18940.9453125, - 18723.662109375, - 26.369497299194336, - 3.4090511798858643, - 0.4470684826374054, - 0.654624342918396, - 0.17616958916187286, - 1.6484158039093018 - ], - "transform": "z = clip((x - mean) / std, -clip_sigma, +clip_sigma), applied inside the graph" - }, - "targets": { - "ne": { - "mean": 2.7511744499206543, - "std": 1.654153823852539 - }, - "te_ped": { - "mean": 0.5915626287460327, - "std": 0.43467429280281067 - }, - "ti_ped": { - "mean": 1.016850233078003, - "std": 0.681096076965332 - }, - "t_rot_ped": { - "mean": 21.244613647460938, - "std": 16.59148406982422 - }, - "neped_prmtan": { - "mean": 2.7231285572052, - "std": 1.7005536556243896 - }, - "teped_prmtan": { - "mean": 0.46375223994255066, - "std": 0.36919456720352173 - }, - "rho_sym": { - "mean": 0.9757616519927979, - "std": 0.04329206794500351 - }, - "ne_top_loc": { - "mean": 0.9261865019798279, - "std": 0.049897171556949615 - } - }, - "hmode": { - "transform": "sigmoid", - "note": "hmode is a logit in the trunk; the graph applies the sigmoid." - }, - "stages": { - "note": "The composed actuator statistics above are the product of these two. Shown for traceability; use the composed values.", - "stage1_physical_to_fpe_zscore": { - "mean": [ - 2.8111997039100878, - 2.154143940948575, - 2.159654935239209, - -1444.0438445123289, - -1315.1185221229061, - -639.741760304047, - 1172.4978680515835, - 1222.4970107268077, - -2488.8410961768263, - -2491.3739557685253, - 1050.107386405324, - -578.9736547563273, - -1421.0817159358041, - -1285.3967398730092, - -1061.0290851406676, - 1186.4795970820587, - 1460.6822372728345, - -2452.093120847959, - -3071.3132492215186, - 1531.3304960724108, - -262.6728625067526, - -6887.604056684089, - -6768.996463787789, - 14.89178144369171, - 1.9421402622606716, - 0.7508911827356307, - 1.0383906373403984, - 0.3920832239686922, - -1.0310375752078498 - ], - "std": [ - 194.08418888726106, - 2.3684465859740262, - 5.948083564785035, - 1267.4907621702682, - 1217.4478106828162, - 1249.3915272640536, - 1345.3871181128568, - 1359.1934832307923, - 1887.1891497052302, - 1888.1014577442652, - 1559.9875106371376, - 1287.2118470203372, - 1271.813282654729, - 1259.8644805335082, - 1361.9306367877398, - 1521.172083160852, - 1393.2120473032558, - 1856.723912629122, - 2432.8530409799628, - 1705.6959050005082, - 1421.8036451037203, - 19092.148992270486, - 18858.28389193975, - 27.289184462156058, - 11.092415079529571, - 9.017289768908354, - 12.055982101097918, - 6.498888909025979, - 1.599000778986496 - ] - }, - "stage2_fpe_zscore_to_model": { - "mean": [ - 0.0052950419485569, - 0.02118559367954731, - 0.0905260294675827, - 0.04865782707929611, - 0.0700167864561081, - 0.03762352466583252, - -0.05525219440460205, - -0.03599006310105324, - -0.002421961398795247, - 0.06557027250528336, - -0.03467077016830444, - 0.03353898227214813, - 0.03765711933374405, - 0.05309795215725899, - 0.040856875479221344, - -0.04087827727198601, - -0.012306398712098598, - -0.006007813848555088, - 0.05333370715379715, - -0.05878793075680733, - 0.03421499580144882, - -0.004070908762514591, - -0.00568280229344964, - 0.005960696842521429, - -0.050121404230594635, - -0.04441944137215614, - -0.042326491326093674, - -0.017714189365506172, - 0.036979787051677704 - ], - "std": [ - 0.015773532912135124, - 0.8918187022209167, - 1.1239787340164185, - 1.0648043155670166, - 1.0253825187683105, - 0.9490270018577576, - 1.0175172090530396, - 0.994783878326416, - 0.9897299408912659, - 1.0588412284851074, - 0.9608724117279053, - 0.9773152470588684, - 1.0754902362823486, - 1.04509437084198, - 0.9610077142715454, - 0.9989661574363708, - 1.0108516216278076, - 0.9890651702880859, - 1.0317550897598267, - 1.007387399673462, - 0.9768117070198059, - 0.9920803308486938, - 0.9928614497184753, - 0.9662984609603882, - 0.30733174085617065, - 0.04957903176546097, - 0.05429871752858162, - 0.02710764855146408, - 1.030903697013855 - ] - } - } -} diff --git a/s7/provenance.json b/s7/provenance.json deleted file mode 100644 index ee94c3924ecabee3ec3bd1d5c9eae78ff48c8a85..0000000000000000000000000000000000000000 --- a/s7/provenance.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "schema_version": 1, - "exported_utc": "2026-09-03T00:46:41.200737+00:00", - "seed": 7, - "source_checkpoint": "/flare/fusiondl_aesp/fuse_bd_model/fuse20/runs/fuse29r_s7/best_model.pt", - "source_checkpoint_sha256": "de45313df2c4b1c42dd9fb9fb5055a139f83d9fff0d942b5b4f7ecfb38862a34", - "norms_source": "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json", - "norms_actuator_space": "physical", - "norms_composed_from": [ - "/lus/flare/projects/fusiondl_aesp/d3d_pedestal_fpe_harrisn85/normalization_params.json", - "/lus/flare/projects/fusiondl_aesp/d3d_fuse20_rho85/norms.json" - ], - "onnx_opset": 17, - "exporter": "torch.onnx.export (TorchScript, dynamo=False)", - "versions": { - "torch": "2.10.0a0+git449b176", - "python": "3.12.12", - "platform": "Linux-5.14.21-150400.24.235-default-x86_64-with-glibc2.31", - "onnx": "1.22.0", - "onnxruntime": "1.29.0" - }, - "artifacts": { - "fuse29_step.onnx": { - "bytes": 45081271, - "sha256": "abf72130ad644f7bf2883c39f336536ad839ae7f609cc88d28a5366459e1693c" - }, - "fuse29_seq.onnx": { - "bytes": 45464382, - "sha256": "db040b029538d47b404e9864538fb0c550285081ecce7348ad6fd231fdd7bbcf" - } - } -}