-
Notifications
You must be signed in to change notification settings - Fork 262
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
Match escn_exportable with escn main #866
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,6 @@ | |
from fairchem.core.datasets import data_list_collater | ||
from fairchem.core.models.escn import escn_exportable | ||
from fairchem.core.models.escn.so3_exportable import ( | ||
CoefficientMapping, | ||
SO3_Grid, | ||
) | ||
from fairchem.core.models.scn.smearing import GaussianSmearing | ||
|
@@ -70,8 +69,8 @@ def load_model(type: str, compile=False, export=False): | |
cutoff=CUTOFF, | ||
max_num_elements=MAX_ELEMENTS, | ||
num_layers=8, | ||
lmax_list=[4], | ||
mmax_list=[2], | ||
lmax_list=[6], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe leave a note here to mention some additional things we can add to make this test more sensitive: add backwards, add better weight initialization etc |
||
mmax_list=[0], | ||
sphere_channels=128, | ||
hidden_channels=256, | ||
edge_channels=128, | ||
|
@@ -87,8 +86,8 @@ def load_model(type: str, compile=False, export=False): | |
cutoff=CUTOFF, | ||
max_num_elements=MAX_ELEMENTS, | ||
num_layers=8, | ||
lmax=4, | ||
mmax=2, | ||
lmax=6, | ||
mmax=0, | ||
sphere_channels=128, | ||
hidden_channels=256, | ||
edge_channels=128, | ||
|
@@ -210,7 +209,6 @@ def test_escn_so2_conv_exports_and_compiles(self, tol=1e-5) -> None: | |
} | ||
|
||
lmax, mmax = 4, 2 | ||
mappingReduced = escn_exportable.CoefficientMapping([lmax], [mmax]) | ||
shpere_channels = 128 | ||
edge_channels = 128 | ||
args = (torch.rand(680, 19, shpere_channels), torch.rand(680, edge_channels)) | ||
|
@@ -222,7 +220,6 @@ def test_escn_so2_conv_exports_and_compiles(self, tol=1e-5) -> None: | |
lmax=lmax, | ||
mmax=mmax, | ||
act=torch.nn.SiLU(), | ||
mappingReduced=mappingReduced, | ||
) | ||
prog = export(so2, args=args, dynamic_shapes=dynamic_shapes1) | ||
export_out = prog.module()(*args) | ||
|
@@ -244,7 +241,6 @@ def test_escn_message_block_exports_and_compiles(self, tol=1e-5) -> None: | |
SO3_grid = torch.nn.ModuleDict() | ||
SO3_grid["lmax_lmax"] = SO3_Grid(lmax, lmax) | ||
SO3_grid["lmax_mmax"] = SO3_Grid(lmax, mmax) | ||
mappingReduced = CoefficientMapping([lmax], [mmax]) | ||
message_block = escn_exportable.MessageBlock( | ||
layer_idx=0, | ||
sphere_channels=sphere_channels, | ||
|
@@ -256,7 +252,6 @@ def test_escn_message_block_exports_and_compiles(self, tol=1e-5) -> None: | |
max_num_elements=90, | ||
SO3_grid=SO3_grid, | ||
act=torch.nn.SiLU(), | ||
mappingReduced=mappingReduced, | ||
) | ||
|
||
# generate inputs | ||
|
@@ -297,7 +292,6 @@ def test_escn_layer_block_exports_and_compiles(self, tol=1e-5) -> None: | |
SO3_grid = torch.nn.ModuleDict() | ||
SO3_grid["lmax_lmax"] = SO3_Grid(lmax, lmax) | ||
SO3_grid["lmax_mmax"] = SO3_Grid(lmax, mmax) | ||
mappingReduced = CoefficientMapping([lmax], [mmax]) | ||
layer_block = escn_exportable.LayerBlock( | ||
layer_idx=0, | ||
sphere_channels=sphere_channels, | ||
|
@@ -309,7 +303,6 @@ def test_escn_layer_block_exports_and_compiles(self, tol=1e-5) -> None: | |
max_num_elements=90, | ||
SO3_grid=SO3_grid, | ||
act=torch.nn.SiLU(), | ||
mappingReduced=mappingReduced, | ||
) | ||
|
||
# generate inputs | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
unless we plan to test this, lets remove this as an option, i still prefer to remove the rescale code and keep it simpler