Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docstring for FNOGNO #202

Merged
merged 4 commits into from
Sep 2, 2023
Merged

docstring for FNOGNO #202

merged 4 commits into from
Sep 2, 2023

Conversation

dhpitt
Copy link
Member

@dhpitt dhpitt commented Aug 21, 2023

FNOGNO needs a docstring! More documentation PRs to come.

@JeanKossaifi
Copy link
Member

Thanks @dhpitt, this is great! Can you just use numpy style docstrings, see e.g. https://github.com/neuraloperator/neuraloperator/blob/main/neuralop/models/fno.py.

Copy link
Member

@JeanKossaifi JeanKossaifi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dhpitt, left some comments.

----------
in_channels : _type_
number of input channels
out_channels : _type_
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
out_channels : _type_
out_channels : int


Parameters
----------
in_channels : _type_
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
in_channels : _type_
in_channels : int

number of hidden channels in embedding block of FNO. Defaults to 256.
gno_coord_dim : int, optional
dimension of GNO input data. Defaults to 3.
gno_coord_embed_dim : _type_, optional
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing type

options: 'linear_kernelonly'
'linear'
'nonlinear_kernelonly'
'nonlinear'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to have a small explanation of each value here

neuralop/models/fnogno.py Outdated Show resolved Hide resolved
How to perform domain padding. Defaults to 'one-sided'.
fno_fft_norm : str, optional
normalization param of torch.fft to use in FNO. Defaults to 'forward'
fno_SpectralConv : nn.Module, optional
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to have directly default is ... instead of optional since having a default value makes it optional anyway.

@JeanKossaifi
Copy link
Member

Thanks @dhpitt! Merging.

@JeanKossaifi JeanKossaifi merged commit 5edb62d into neuraloperator:main Sep 2, 2023
1 check passed
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.

None yet

2 participants