-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07d1f23
commit dc8bb6f
Showing
8 changed files
with
32 additions
and
38 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
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 |
---|---|---|
@@ -1,12 +1,2 @@ | ||
from .model import Model # noqa: F401 | ||
from .train import train # noqa: F401 | ||
|
||
from metatensor.models import ARCHITECTURE_CONFIG_PATH | ||
from omegaconf import OmegaConf | ||
|
||
DEAFAULT_HYPERS = OmegaConf.to_container( | ||
OmegaConf.load(ARCHITECTURE_CONFIG_PATH / "soap_bpnn.yaml") | ||
) | ||
|
||
DEFAULT_MODEL_HYPERS = DEAFAULT_HYPERS["model"] | ||
DEFAULT_TRAIN_HYPERS = DEAFAULT_HYPERS["train"] | ||
from .model import Model, DEFAULT_MODEL_HYPERS # noqa: F401 | ||
from .train import train, DEFAULT_TRAINING_HYPERS # noqa: F401 |
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
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 |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import torch | ||
|
||
from metatensor.models.soap_bpnn import Model | ||
|
||
from . import DEAFAULT_HYPERS | ||
from metatensor.models.soap_bpnn import DEFAULT_MODEL_HYPERS, Model | ||
|
||
|
||
def test_torchscript(): | ||
"""Tests that the model can be jitted.""" | ||
|
||
all_species = [1, 6, 7, 8] | ||
soap_bpnn = Model(all_species, DEAFAULT_HYPERS["model"]).to(torch.float64) | ||
soap_bpnn = Model(all_species, DEFAULT_MODEL_HYPERS).to(torch.float64) | ||
torch.jit.script(soap_bpnn) |
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