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

Light refactor to improve development #305

Merged
merged 6 commits into from
Nov 5, 2024
Merged

Conversation

JustinBakerMath
Copy link
Collaborator

PR aimed at improving signatures and variable names to enhance model development.

  • Signature change: Base.__init__(input_args, conv_args, ...) requires arguments to be specified in the input to the base class. This enables better wrapper development by instantiating self.input_args, self.conv_args among all classes inheriting from Base. 1
  • Note: this will automatically handle edge_attr adding to the arguments if use_edge_attr is true 2.
  • Function change: _conv_args has been changed to _embedding to handle embedding of equivariant information. This is inline with the recent changes in PAINN and fits closely to the actual operations of this function. 3
  • Variable change: x, pos to inv_node_feat, equiv_node_feat. The original architectures treated x as invariant information and pos as equivariant information. To improve the transparency of these variable names they have been adjusted. 4
  • Note: as a consequence, many architectures can be abstracted to Base e.g. PAINN and PNAEq now share the same forward call as Base. 5

@JustinBakerMath JustinBakerMath self-assigned this Oct 31, 2024
@JustinBakerMath JustinBakerMath added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 31, 2024
self.input_args
== "inv_node_feat, equiv_node_feat, edge_index, edge_attr"
)
assert self.conv_args == "inv_node_feat, edge_index, edge_attr"
Copy link
Collaborator

Choose a reason for hiding this comment

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

@JustinBakerMath

Why do some stacks has this assert and others not?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can add them everywhere or remove them all. I just added this for security.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@JustinBakerMath @ArCho48

I am partial to removing them all since they are set just before, but could be convinced either way.

@RylieWeaver
Copy link
Collaborator

@JustinBakerMath

I've cloned and working on revising the incorporating the MACEStack. It looks like I have commit ability to your branch here. Do you have a preference for me PR'ing to your branch or directly committing is fine?

@JustinBakerMath
Copy link
Collaborator Author

@JustinBakerMath

I've cloned and working on revising the incorporating the MACEStack. It looks like I have commit ability to your branch here. Do you have a preference for me PR'ing to your branch or directly committing is fine?

I am ok with whatever your preference is. It makes sense to add it here.

@RylieWeaver
Copy link
Collaborator

@JustinBakerMath @ArCho48

Thanks for yalls patience, I need to polish up MACE in other ways but it's best to leave that to do separate PR. Assuming MACE passes the checks, I believe it's integrated into the format here.


### There is a readout before the first convolution layer ###
outputs = []
### MACE has a readout block before convolutions ###
output = self.multihead_decoders[0](
Copy link
Collaborator

@RylieWeaver RylieWeaver Nov 1, 2024

Choose a reason for hiding this comment

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

@JustinBakerMath

Drawing your attention to this part. I moved it back since it is actually an output that is used for prediction, but let me know if there was a specific reason you moved this to embedding that still holds.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This makes sense to me.

@RylieWeaver
Copy link
Collaborator

@JustinBakerMath @ArCho48

Is there anything left to adjust before tagging Max?

@ArCho48
Copy link
Collaborator

ArCho48 commented Nov 4, 2024 via email

@allaffa allaffa merged commit d1fb63d into ORNL:main Nov 5, 2024
2 checks passed
RylieWeaver added a commit to RylieWeaver/HydraGNN that referenced this pull request Nov 8, 2024
* light refactor to improve development

* removed printing

* testing my commit ability

* reformat MACE

* remove test change

* fix error relating to readout block dimension input

---------

Co-authored-by: Justin <[email protected]>
Co-authored-by: Rylie Weaver <[email protected]>
RylieWeaver added a commit to RylieWeaver/HydraGNN that referenced this pull request Nov 8, 2024
* light refactor to improve development

* removed printing

* testing my commit ability

* reformat MACE

* remove test change

* fix error relating to readout block dimension input

---------

Co-authored-by: Justin <[email protected]>
Co-authored-by: Rylie Weaver <[email protected]>
RylieWeaver added a commit to RylieWeaver/HydraGNN that referenced this pull request Nov 12, 2024
* light refactor to improve development

* removed printing

* testing my commit ability

* reformat MACE

* remove test change

* fix error relating to readout block dimension input

---------

Co-authored-by: Justin <[email protected]>
Co-authored-by: Rylie Weaver <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants