autocast.metrics.deterministic#
Deterministic metrics.
Power-spectrum RMSE utilities in this module based on the implementation from: - Lost in Latent Space: An Empirical Study of Latent Diffusion Models for Physics Emulation (Rozet et al., 2024), https://arxiv.org/abs/2507.02608, PolymathicAI/lola - Specific code from:
- class BTSCMetric(reduce_all=True, dist_sync_on_step=False)[source]#
Bases:
BaseMetric[Float[Tensor, 'batch time spatial *spatial channel']|Float[Tensor, 'batch time spatial *spatial channel ensemble'],Float[Tensor, 'batch time spatial *spatial channel']]Base class for metrics that operate on spatial tensors.
Checks input types and shapes and converts to Tensor.
- class MSE(reduce_all=True, dist_sync_on_step=False)[source]#
Bases:
BTSCMetricMean Squared Error over spatial dims.
- class MAE(reduce_all=True, dist_sync_on_step=False)[source]#
Bases:
BTSCMetricMean Absolute Error over spatial dims.
- class NMAE(reduce_all=True, dist_sync_on_step=False, eps=1e-07)[source]#
Bases:
BTSCMetricNormalized Mean Absolute Error over spatial dims.
- class NMSE(reduce_all=True, dist_sync_on_step=False, eps=1e-07)[source]#
Bases:
BTSCMetricNormalized Mean Squared Error over spatial dims.
- class RMSE(reduce_all=True, dist_sync_on_step=False)[source]#
Bases:
BTSCMetricRoot Mean Squared Error over spatial dims.
- class NRMSE(eps=1e-07, reduce_all=True, dist_sync_on_step=False)[source]#
Bases:
BTSCMetricNormalized Root Mean Squared Error over spatial dims.
- class VMSE(eps=1e-07, reduce_all=True, dist_sync_on_step=False)[source]#
Bases:
BTSCMetricVariance Scaled Mean Squared Error over spatial dims.
Computes VMSE = MSE / (std(y_true)**2 + eps). Preserved for comparability with prior runs; matches The Well’s VMSE formula and default eps.
- class VRMSE(eps=1e-07, reduce_all=True, dist_sync_on_step=False)[source]#
Bases:
BTSCMetricVariance-Scaled Root Mean Squared Error over spatial dims.
Computes VRMSE = sqrt(MSE) / (std(y_true) + eps). Preserved for comparability with prior runs. Differs from the LOLA / The Well canonical form sqrt(MSE / (var + eps)) only in the regularization regime (small std); for non-degenerate fields the two agree to <<1%.
- class VMSE2(eps=1e-06, reduce_all=True, dist_sync_on_step=False)[source]#
Bases:
BTSCMetricVariance-Scaled MSE matching LOLA’s evaluator.
Computes VMSE = MSE / (var(y_true) + eps) with eps = 1e-6, matching francois-rozet/lola.
Same formula as [VMSE][autocast.metrics.deterministic.VMSE], but with a larger regularizer that prevents tiny-variance fields from dominating the aggregate.
- class VRMSE2(eps=1e-06, reduce_all=True, dist_sync_on_step=False)[source]#
Bases:
BTSCMetricVariance-Scaled RMSE matching LOLA’s evaluator.
Computes VRMSE = sqrt(MSE / (var(y_true) + eps)) with eps = 1e-6, matching francois-rozet/lola.
The Well uses the same formula with eps = 1e-7. Use this for new evaluation work; [VRMSE][autocast.metrics.deterministic.VRMSE] uses a different regularizer (std + eps in the denominator) that produces inflated values for near-uniform fields.
- class LInfinity(reduce_all=True, dist_sync_on_step=False)[source]#
Bases:
BTSCMetricL-Infinity Norm over spatial dims.
- class PowerSpectrumRMSE(reduce_all=True, dist_sync_on_step=False, eps=1e-06)[source]#
Bases:
BTSCMetricAverage power spectrum RMSE across first three LOLA eval bands.
- class PowerSpectrumRMSELow(reduce_all=True, dist_sync_on_step=False, eps=1e-06)[source]#
Bases:
PowerSpectrumRMSEPower spectrum RMSE in the low-frequency band.
- class PowerSpectrumRMSEMid(reduce_all=True, dist_sync_on_step=False, eps=1e-06)[source]#
Bases:
PowerSpectrumRMSEPower spectrum RMSE in the mid-frequency band.
- class PowerSpectrumRMSEHigh(reduce_all=True, dist_sync_on_step=False, eps=1e-06)[source]#
Bases:
PowerSpectrumRMSEPower spectrum RMSE in the high-frequency band.
- class PowerSpectrumRMSETail(reduce_all=True, dist_sync_on_step=False, eps=1e-06)[source]#
Bases:
PowerSpectrumRMSEPower spectrum RMSE in the LOLA high-frequency tail band.
- class PowerSpectrumCCRMSE(reduce_all=True, dist_sync_on_step=False, eps=1e-06)[source]#
Bases:
BTSCMetricAverage cross-correlation RMSE across first three LOLA eval bands.
- class PowerSpectrumCCRMSELow(reduce_all=True, dist_sync_on_step=False, eps=1e-06)[source]#
Bases:
PowerSpectrumCCRMSECross-correlation RMSE in the low-frequency band.
- class PowerSpectrumCCRMSEMid(reduce_all=True, dist_sync_on_step=False, eps=1e-06)[source]#
Bases:
PowerSpectrumCCRMSECross-correlation RMSE in the mid-frequency band.
- class PowerSpectrumCCRMSEHigh(reduce_all=True, dist_sync_on_step=False, eps=1e-06)[source]#
Bases:
PowerSpectrumCCRMSECross-correlation RMSE in the high-frequency band.