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

Adding the non-spectral SFNO from nvidia #101

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Adding the non-spectral SFNO from nvidia #101

wants to merge 2 commits into from

Conversation

jsschreck
Copy link
Collaborator

Environment.yml has not bee updated yet

@jsschreck jsschreck requested a review from WillyChap September 19, 2024 14:43
@djgagne djgagne self-requested a review September 26, 2024 16:54
Copy link
Collaborator

@djgagne djgagne left a comment

Choose a reason for hiding this comment

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

I have some change requests to add unit tests and make sure dependencies are being managed properly.


# classes

class CrossFormer(BaseModel):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you call the class CrossFormerGated or CrossFormerGRU?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops did not mean to add xformer-gated; was mainly testing Arnolds approach with the code base at the time. Will remove eventually


# cube embedding

class CubeEmbedding(nn.Module):
Copy link
Collaborator

Choose a reason for hiding this comment

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

For some of these layers that may be shared across multiple models, can we create a separate layers module or directory within credit/models?

# pad_lat=pad_lat
# ).to("cuda")

image_height = 640 # 640, 192
Copy link
Collaborator

Choose a reason for hiding this comment

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

contents of if __name__ == "__main__ block should be moved to a unit test.

import torch
import warnings
from tltorch.factorized_tensors.core import FactorizedTensor
import tensorly as tl
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tensorly and tltorch need to be added to pyproject.toml, requirements.txt, and the various environment.yml files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am going to try to not depend on these packages; will update eventually

return x


class SphericalFourierNeuralOperatorNet(nn.Module):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Docstring should be converted from numpy to google style. Also, you should add a link in the docstring to where the code originally came from.



if __name__ == "__main__":
image_height = 192 # 640, 192
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please create a unit test in the tests directory with this code.

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