-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Environment.yml has not bee updated yet