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

Model specific Crystal MLP proxy and wrapper #81

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

Conversation

sh-divya
Copy link
Collaborator

Proxy model specific to MLP trained on Sendek LR model. Currently accepts path to saved state_dict and standardization tensors, which are available in the data directory.

Class that wraps as well the the MLP module class are available

Copy link
Owner

@alexhernandezgarcia alexhernandezgarcia left a comment

Choose a reason for hiding this comment

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

Looks great, thanks! I have suggested one (minor) change and commented about taking the path from the config instead of being hard coded. Not crucial because it won't break anything, but it would be nicer.

gflownet/proxy/crystals.py Outdated Show resolved Hide resolved
@@ -0,0 +1,5 @@
_target_: gflownet.proxy.crystals.SendekMLPWrapper
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Proxy and user config file for crystal runs

@@ -269,7 +273,7 @@ def get_parents(self, state=None, done=None, actions=None):
parent = state.copy()
parent[self.elem2idx[element]] -= n
parents.append(parent)
actions.append(idx)
actions.append(action)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

return actions as a list of action tuples, instead of indices

@@ -100,12 +100,3 @@ def forward(self, x):
x = self.hidden_act(x)

return x


if __name__ == "__main__":
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed hardcoding of paths

Base automatically changed from crystals to main August 8, 2023 15:05
alexhernandezgarcia added a commit that referenced this pull request Jun 10, 2024
…-public

[WIP, Crystal-GFN] Merges the current public main
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