Skip to content

fix: align GINOConfig parameter names with GINO.__init__ signature - #725

Open
harshaa765 wants to merge 1 commit into
neuraloperator:mainfrom
harshaa765:fix/gino-config-param-names
Open

fix: align GINOConfig parameter names with GINO.__init__ signature#725
harshaa765 wants to merge 1 commit into
neuraloperator:mainfrom
harshaa765:fix/gino-config-param-names

Conversation

@harshaa765

Copy link
Copy Markdown
Contributor

Summary

GINOConfig (and its subclass GINO_Small3d) defined four config fields whose names do not match any parameter in GINO.__init__. This caused an immediate TypeError when running scripts/train_gino_carcfd.py, because get_model passes all config fields as **kwargs directly to the model constructor.

Changes in config/models.py:

Old field (config) Correct field (GINO __init__)
gno_coord_embed_dim gno_embed_channels
gno_radius in_gno_radius + out_gno_radius (split)
gno_pos_embed_type in_gno_pos_embed_type + out_gno_pos_embed_type (split)
fno_domain_padding (removed — not a GINO parameter)

The same stale fno_domain_padding field is also removed from GINO_Poisson2d, which inherits from GINOConfig.

Note: GINO_Poisson2d already used the correct split names (in_gno_radius, out_gno_radius, in_gno_pos_embed_type, out_gno_pos_embed_type, gno_embed_channels) as its own overrides — those are preserved unchanged.

Test plan

  • Ran scripts/train_gino_carcfd.py — model now instantiates and trains without error (verified epoch 0 and epoch 1 with decreasing loss)
  • black config/models.py — no formatting changes needed

@JeanKossaifi

Copy link
Copy Markdown
Member

Thanks for finding and fixing these issues @harshaa765! Was there a reason for changing the default from nerf to transformer? If not I'd leave it to not create a new surprising behavior for existing users. Otherwise it looks good to me!

@harshaa765

Copy link
Copy Markdown
Contributor Author

Thanks for finding and fixing these issues @harshaa765! Was there a reason for changing the default from nerf to transformer? If not I'd leave it to not create a new surprising behavior for existing users. Otherwise it looks good to me!

Thanks @JeanKossaifi for the review! You are right, changing the default wasn't intentional. I'll push an update a bit later to change it back to nerf. Glad you caught that!

GINOConfig (and GINO_Small3d) contained four parameter names that do
not match the arguments accepted by GINO.__init__, causing a TypeError
at model instantiation time:

- gno_coord_embed_dim  -> gno_embed_channels
- gno_radius           -> in_gno_radius + out_gno_radius (split)
- gno_pos_embed_type   -> in_gno_pos_embed_type + out_gno_pos_embed_type (split)
- fno_domain_padding   removed (not a parameter of GINO)

The split pos_embed_type fields keep the original 'nerf' default to
preserve existing behavior (GINO.__init__ itself defaults to
'transformer', but the config has historically used 'nerf').

The same fno_domain_padding stale field is also removed from
GINO_Poisson2d, which inherits from GINOConfig.

Verified by running scripts/train_gino_carcfd.py end-to-end: the model
now instantiates and trains without error.
@harshaa765
harshaa765 force-pushed the fix/gino-config-param-names branch from 0167a1d to b9df4d7 Compare June 24, 2026 14:48
@harshaa765

Copy link
Copy Markdown
Contributor Author

@JeanKossaifi reverted the default back to nerf for both in_gno_pos_embed_type and out_gno_pos_embed_type to preserve existing behavior, as you suggested. (Note: GINO.__init__ itself defaults to transformer, but I've kept the config on nerf so there's no surprising change for existing users.) Also rebased onto the latest main. Thanks again for the review!

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.

2 participants