FNO Training and Evaluation

This page describes the FNO workflow using the generic training framework.

Entry points and configs

  • Training entry point: src/train.py

  • Evaluation entry point: src/evaluate.py

  • Base config: src/training/config/default.yaml

  • FNO 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.json next 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_cases

  • output.plot_case_indices

  • output.plot_velocity_x_field

  • output.plot_velocity_y_field

  • output.plot_quiver_step

  • output.plot_cmap

  • output.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

cases/moose_grid/configs/train_fno.yaml

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)

cases/alpha_d/configs/train_mlp.yaml

pointwise

Tabular/axial-profile surrogate

Conv1D profile

cases/alpha_d/configs/train_conv1d.yaml

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.py are removed.

  • Use train.py / evaluate.py for all supervised one-step models, including FNO.