Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
de96799
Add FNO with custom loss and learnable weights
sgreenbury Sep 23, 2025
dfdfee9
Add override of rollout model with teacher forcing
sgreenbury Sep 24, 2025
17cded8
Fix device handling
sgreenbury Sep 24, 2025
646caed
Add required metadata in custom loss func
sgreenbury Sep 24, 2025
779db79
Fix custom loss fn call
sgreenbury Sep 24, 2025
8e0a543
Fix init
sgreenbury Sep 24, 2025
ef42685
Update reaction-diffusion with learnable weights
sgreenbury Sep 24, 2025
0b0bfef
Improve advection-diffusion
sgreenbury Sep 24, 2025
e066c8a
Add support for optional teacher forcing
sgreenbury Sep 24, 2025
2a1d3bf
Explore updating example notebooks with teacher forcing
sgreenbury Sep 24, 2025
1a5021b
Update current FNO and The Well FNO
sgreenbury Sep 29, 2025
d1eb66e
Add fixes for FNO with time
sgreenbury Sep 29, 2025
5bba3cf
Add turbulent_radiative_layer_2D notebook
sgreenbury Sep 29, 2025
25e20b6
Add scripts and config for training
sgreenbury Oct 7, 2025
9e6538e
Update paths and gitignore
sgreenbury Oct 7, 2025
5009d1d
update the advection-diffusion config
sgreenbury Oct 8, 2025
570ff40
Fix types and lints
sgreenbury Oct 8, 2025
d71e120
Rename to val_dataset to match WellDataModule
sgreenbury Oct 8, 2025
e246d02
Update pyproject and lock
sgreenbury Oct 16, 2025
cd8e07c
Update advection-diffusion config
sgreenbury Oct 16, 2025
74640e1
Add trainer script and update gitignore
sgreenbury Oct 16, 2025
f45b558
Add run_trainier_bout
sgreenbury Oct 16, 2025
276f25b
Fix config
sgreenbury Oct 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@ autoemulate/experimental/exploratory/data
case_studies/**/data/

# Benchmarking data
benchmarks/data/
benchmarks/data/

# Ignore experimental outputs
autoemulate/experimental/outputs/
outputs
7 changes: 4 additions & 3 deletions autoemulate/emulators/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,8 @@ class PyTorchBackend(nn.Module, Emulator):
epochs: int = 10
loss_history: ClassVar[list[float]] = []
verbose: bool = False
loss_fn: nn.Module = nn.MSELoss()
optimizer_cls: type[optim.Optimizer] = optim.Adam
loss_fn: nn.Module
optimizer_cls: type[optim.Optimizer]
optimizer: optim.Optimizer
supports_grad: bool = True
lr: float = 1e-1
Expand Down Expand Up @@ -608,9 +608,10 @@ def _fit(self, x: TensorLike, y: TensorLike):
# Track loss
epoch_loss += loss.item()
batches += 1

# Update learning rate if scheduler is defined
if self.scheduler is not None:
self.scheduler.step() # type: ignore[call-arg]
self.scheduler.step()

# Average loss for the epoch
avg_epoch_loss = epoch_loss / batches
Expand Down
Loading
Loading