Skip to content

Support configurable MeshGraphNets rollout lengths - #747

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:masterfrom
sylvesterkaczmarek:feature/meshgraphnets-rollout-steps
Open

Support configurable MeshGraphNets rollout lengths#747
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:masterfrom
sylvesterkaczmarek:feature/meshgraphnets-rollout-steps

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

Allow MeshGraphNets evaluation rollouts to run for an explicit number of autoregressive steps instead of being limited to the ground-truth trajectory length.

Fixes #399.

cfd_eval.evaluate previously tied rollout length directly to inputs['cells'].shape[0]. Increasing the internal rollout length made the prediction longer than the target tensors, so evaluation failed when computing errors or fetching the saved trajectory.

This change:

  • adds --rollout_steps; 0 preserves the dataset trajectory length
  • threads an optional rollout length through both CFD and cloth evaluators, which share the same evaluation entry point
  • computes MSE only for the overlap with available ground truth
  • trims or extends the static mesh/topology trajectory fields to the prediction length so saved long rollouts remain self-contained
  • updates CFD and cloth plotting scripts to use prediction length, allowing additional generated steps to be visualized
  • rejects negative rollout lengths
  • preserves existing behavior when the new flag is not set

Validation

Added meshgraphnets/cfd_eval_test.py covering:

  • unchanged default rollout length
  • a 5-step prediction generated from a 3-step ground-truth trajectory
  • extension of saved mesh/topology fields to the prediction length
  • retention of ground truth for its original 3 steps
  • expected autoregressive prediction values

I could not execute the TensorFlow regression test locally because TensorFlow is not installed in this environment. No local test execution is claimed. The final branch is based on current upstream master, contains one commit, and the diff was audited against upstream.

@polarbe

polarbe commented Aug 23, 2026 via email

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Long rollout feature

2 participants