-
Notifications
You must be signed in to change notification settings - Fork 15
Feature/alignn model #12
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| trainer: property | ||
|
|
||
sidnb13 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| task: | ||
| identifier: "alignn_train_100" | ||
| reprocess: False | ||
| parallel: True | ||
| seed: 0 | ||
| save_dir: "." | ||
| checkpoint_dir: "." | ||
| write_output: True | ||
| parallel: True | ||
| # Training print out frequency (print per n number of epochs) | ||
| verbosity: 1 | ||
|
|
||
|
|
||
| model: | ||
| name: ALIGNN | ||
| load_model: False | ||
| save_model: True | ||
| model_path: "alignn_model.pth" | ||
| alignn_layers: 4 | ||
| gcn_layers: 4 | ||
| atom_input_features: 114 | ||
| edge_input_features: 50 | ||
| triplet_input_features: 40 | ||
| embedding_features: 64 | ||
| hidden_features: 256 | ||
| output_features: 1 | ||
| min_edge_distance: 0.0 | ||
| max_edge_distance: 8.0 | ||
| link: "identity" | ||
|
|
||
| optim: | ||
| max_epochs: 100 | ||
| lr: 0.001 | ||
| # Either custom or from torch.nn.functional library. If from torch, loss_type is TorchLossWrapper | ||
| loss: | ||
| loss_type: "TorchLossWrapper" | ||
| loss_args: {"loss_fn": "mse_loss"} | ||
|
|
||
| batch_size: 64 | ||
|
|
||
| optimizer: | ||
| optimizer_type: "AdamW" | ||
| optimizer_args: {"weight_decay": 0.00001} | ||
| scheduler: | ||
| scheduler_type: "OneCycleLR" | ||
| # Look further into steps per epoch, for now hardcoded calculation from paper | ||
| scheduler_args: {"max_lr": 0.001, "epochs": 300, "steps_per_epoch": 1} | ||
|
|
||
| dataset: | ||
| processed: False | ||
| # Path to data files | ||
| # src: "/global/cfs/projectdirs/m3641/Shared/Materials_datasets/MP_data_69K/raw/" | ||
| src: "/storage/home/hhive1/sbaskaran31/scratch/MP_data_69K/raw/" | ||
| # Path to target file within data_path | ||
| # target_path: "/global/cfs/projectdirs/m3641/Shared/Materials_datasets/MP_data_69K/targets.csv" | ||
| target_path: "/storage/home/hhive1/sbaskaran31/scratch/MP_data_69K/targets.csv" | ||
| # Path to save processed data.pt file (a directory path not filepath) | ||
| # pt_path: "/global/cfs/projectdirs/m3641/Sidharth/datasets/MP_data_69K/" | ||
| pt_path: "/storage/home/hhive1/sbaskaran31/scratch/MP_data_69K/" | ||
| transforms: | ||
| - name: GetY | ||
| args: | ||
| index: 0 | ||
| otf: False | ||
| - name: NumNodeTransform | ||
| args: | ||
| otf: False | ||
| - name: LineGraphMod | ||
| args: | ||
| otf: False | ||
| - name: ToFloat | ||
| args: | ||
| otf: False | ||
| # Format of data files (limit to those supported by ASE) | ||
| data_format: "json" | ||
| # Method of obtaining atom idctionary: available:(onehot) | ||
| node_representation: "onehot" | ||
| additional_attributes: [] | ||
| # Print out processing info | ||
| verbose: True | ||
| # Loading dataset params | ||
| # Index of target column in targets.csv | ||
| # graph specific settings | ||
| cutoff_radius : 8.0 | ||
| n_neighbors : 12 | ||
| edge_steps : 50 | ||
| # Ratios for train/val/test split out of a total of 1 | ||
| train_ratio: 0.8 | ||
| val_ratio: 0.05 | ||
| test_ratio: 0.15 | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
|
|
||
| trainer: property | ||
|
|
||
| task: | ||
| # run_mode: train | ||
| identifier: "alignn_train_100" | ||
|
|
||
| reprocess: False | ||
|
|
||
|
|
||
| parallel: True | ||
| seed: 0 | ||
| #seed=0 means random initalization | ||
|
|
||
|
|
||
| write_output: True | ||
| parallel: True | ||
| #Training print out frequency (print per n number of epochs) | ||
| verbosity: 1 | ||
|
|
||
|
|
||
|
|
||
| model: | ||
| name: ALIGNN_GRAPHITE | ||
| load_model: False | ||
| save_model: True | ||
| model_path: "alignn_graphite_model.pth" | ||
| num_interactions: 4 | ||
| num_species: 3 | ||
| cutoff: 3.0 | ||
| dim: 64 | ||
| # min_angle: float = 0.0, | ||
| # max_angle: float = torch.acos(torch.zeros(1)).item() * 2, | ||
| link: "identity" | ||
|
|
||
| optim: | ||
| max_epochs: 103 | ||
| lr: 0.001 | ||
| #Either custom or from torch.nn.functional library. If from torch, loss_type is TorchLossWrapper | ||
| loss: | ||
| loss_type: "TorchLossWrapper" | ||
| loss_args: {"loss_fn": "mse_loss"} | ||
|
|
||
| batch_size: 64 | ||
|
|
||
| optimizer: | ||
| optimizer_type: "AdamW" | ||
| optimizer_args: {"weight_decay": 0.00001} | ||
| scheduler: | ||
| scheduler_type: "OneCycleLR" | ||
| # Look further into steps per epoch, for now hardcoded calculation from paper | ||
| scheduler_args: {"max_lr": 0.001, "epochs": 300, "steps_per_epoch": 1} | ||
|
|
||
| dataset: | ||
| processed: True # if False, need to preprocessor data and generate .pt file | ||
| # Whether to use "inmemory" or "large" format for pytorch-geometric dataset. Reccomend inmemory unless the dataset is too large | ||
| # dataset_type: "inmemory" | ||
| #Path to data files | ||
| src: "/global/cfs/projectdirs/m3641/Shared/Materials_datasets/MP_data_69K/raw/" | ||
| #Path to target file within data_path | ||
| target_path: "/global/cfs/projectdirs/m3641/Shared/Materials_datasets/MP_data_69K/targets.csv" | ||
| #Path to save processed data.pt file (a directory path not filepath) | ||
| pt_path: "/global/cfs/projectdirs/m3641/Sidharth/datasets/MP_data_69K/" | ||
| transforms: | ||
| - name: GetY | ||
| args: | ||
| index: 0 | ||
| otf: False | ||
| - name: NumNodeTransform | ||
| args: | ||
| otf: False | ||
| - name: LineGraphMod | ||
| args: | ||
| otf: False | ||
| - name: ToFloat | ||
| args: | ||
| otf: False | ||
| #Format of data files (limit to those supported by ASE) | ||
| data_format: "json" | ||
| #Method of obtaining atom idctionary: available:(onehot) | ||
| node_representation: "onehot" | ||
| additional_attributes: [] | ||
| #Print out processing info | ||
| verbose: True | ||
|
|
||
| #Loading dataset params | ||
| #Index of target column in targets.csv | ||
| target_index: 0 | ||
|
|
||
| #graph specific settings | ||
| cutoff_radius : 8.0 | ||
| n_neighbors : 12 | ||
| edge_steps : 50 | ||
|
|
||
| #Ratios for train/val/test split out of a total of 1 | ||
| train_ratio: 0.8 | ||
| val_ratio: 0.05 | ||
| test_ratio: 0.15 |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -11,6 +11,6 @@ dependencies: | |
| - pre-commit | ||
| - numpy | ||
| - scipy | ||
| - ase=3.21.* | ||
| - ase==3.21.* | ||
| - black | ||
| - pandas | ||
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.