FNO Training and Evaluation¶
This page describes the FNO workflow using the generic training framework.
Entry points and configs¶
Training entry point:
src/train.pyEvaluation entry point:
src/evaluate.pyBase config:
src/training/config/default.yamlFNO example config:
src/cases/moose_grid/configs/train_fno.yaml
train_fno.yaml inherits default.yaml (resolved via hydra.searchpath: pkg://training.config) and sets FNO-specific model/data/training/eval/output values.
Train an FNO model¶
From src/:
python train.py --config-path cases/moose_grid/configs --config-name train_fno
With overrides:
python train.py --config-path cases/moose_grid/configs --config-name train_fno training.epochs=50 model.params.num_fno_layers=6
Training writes:
checkpoint:
output.checkpoint(default../data/cases/train_fno/model.mdlus)run metadata:
run_meta.jsonnext to the checkpoint
run_meta.json stores resolved data fields, split names, adapter, model entrypoint, and model params.
Evaluate an FNO checkpoint¶
From src/:
python evaluate.py --config-path cases/moose_grid/configs --config-name train_fno
You can also pass checkpoint explicitly:
python evaluate.py --config-path cases/moose_grid/configs --config-name train_fno eval.checkpoint=../data/models/lid_driven_fno.mdlus
Evaluation reads run_meta.json from the checkpoint directory (or eval.run_meta if set),
reconstructs the dataset/split, and computes element-weighted metrics.
Optional plots during evaluation¶
python evaluate.py --config-path cases/moose_grid/configs --config-name train_fno output.plot_dir=../data/models/lid_driven_fno_plots
Plot controls:
output.plot_max_casesoutput.plot_case_indicesoutput.plot_velocity_x_fieldoutput.plot_velocity_y_fieldoutput.plot_quiver_stepoutput.plot_cmapoutput.plot_dpi
Other built-in models¶
The generic training framework supports multiple model families through the
adapter pattern. All use the same train.py / evaluate.py entry points.
Model |
Config |
Adapter |
Use case |
|---|---|---|---|
FNO |
|
grid |
Regular-grid operator learning |
AFNO |
(custom) |
grid |
Adaptive Fourier neural operator |
Pix2Pix |
(custom) |
grid |
Image-to-image translation |
MeshGraphNet |
(custom) |
graph |
Unstructured mesh GNN |
MLP (FullyConnected) |
|
pointwise |
Tabular/axial-profile surrogate |
Conv1D profile |
|
profile |
1D convolutional axial-profile surrogate |
The MLP model uses the pointwise adapter, which reads per-case .zarr
stores containing features/ and targets/ arrays (tabular data). See
Alpha-D Surrogate Tutorial for the full
workflow.
Hyperparameter optimization¶
All models support Optuna-based hyperparameter optimization via
train.py. Add an hpo section to the training config that defines a
search space over training.* and model.params.* paths.
cd src && python train.py --config-path cases/alpha_d/configs --config-name train_mlp
See Hyperparameter Optimization Guide for search-space format, study settings, output artifacts, and how to add HPO for new models.
Notes¶
The legacy wrappers
train_fno.py/eval_fno.pyare removed.Use
train.py/evaluate.pyfor all supervised one-step models, including FNO.