forked from IntelLabs/matsciml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request IntelLabs#212 from laserkelvin/lightning-cli-revival
Lightning CLI revival
- Loading branch information
Showing
7 changed files
with
55 additions
and
56 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
data: | ||
class_path: matsciml.lightning.data_utils.MatSciMLDataModule | ||
init_args: | ||
dataset: "MaterialsProjectDataset" | ||
train_path: null # this needs to be changed to match your dataset path! | ||
dset_kwargs: | ||
transforms: | ||
- class_path: matsciml.datasets.transforms.PeriodicPropertiesTransform | ||
init_args: | ||
cutoff_radius: 6.0 | ||
adaptive_cutoff: true | ||
- class_path: matsciml.datasets.transforms.PointCloudToGraphTransform | ||
init_args: | ||
backend: "pyg" | ||
node_keys: ["pos", "atomic_numbers"] |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
model: | ||
class_path: matsciml.models.base.ScalarRegressionTask | ||
init_args: | ||
encoder_class: matsciml.models.pyg.EGNN | ||
encoder_kwargs: | ||
hidden_dim: 128 | ||
output_dim: 64 | ||
task_keys: # this matches the dataset | ||
- "band_gap" |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
# This uses the matsciml Lightning CLI wrapper to configure | ||
# the training workflow. The advantage of doing so is the | ||
# ability to modularize experiments, i.e. not have to redefine | ||
# datasets, models, and/or trainer control. | ||
python -m matsciml.lightning.cli fit \ | ||
--config data.yml \ | ||
--config egnn.yml \ | ||
--config trainer.yml \ | ||
--trainer.fast_dev_run 20 # override some config if we need to |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# pytorch_lightning==2.2.4 | ||
seed_everything: true | ||
trainer: | ||
accelerator: auto | ||
strategy: auto | ||
devices: auto | ||
num_nodes: 1 | ||
precision: null | ||
logger: null | ||
callbacks: null | ||
fast_dev_run: 10 | ||
max_epochs: null | ||
min_epochs: null | ||
gradient_clip_val: null | ||
gradient_clip_algorithm: null | ||
inference_mode: false |
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 was deleted.
Oops, something went wrong.
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