Skip to content

Commit

Permalink
Fix DeepLearningModel base and rerun some of the examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
muammar committed Mar 7, 2020
1 parent 454552c commit 5bc7808
Show file tree
Hide file tree
Showing 23 changed files with 1,110 additions and 724 deletions.
9 changes: 5 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,22 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#

import os
import sys
sys.path.insert(0, os.path.abspath("../../"))

try:
import torch
except ModuleNotFoundError:
import os
import sys
from unittest.mock import MagicMock

sys.path.insert(0, os.path.abspath("../../"))

class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return MagicMock()

MOCK_MODULES = ['torch', "torch.optim"]
MOCK_MODULES = ['torch', "torch.optim", "torch.nn.Module"]

sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

Expand Down
Binary file modified examples/autoencoder/cu_training.latent
Binary file not shown.
1,028 changes: 653 additions & 375 deletions examples/autoencoder/cu_training.log

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/autoencoder/cu_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
sys.path.append("../../")
from ase.io import Trajectory
from dask.distributed import Client, LocalCluster
from ml4chem import Potentials
from ml4chem.atomistic import Potentials
from ml4chem.data.handler import Data
from ml4chem.atomistic.features import Gaussian
from ml4chem.atomistic.models.autoencoders import AutoEncoder, train
Expand Down
2 changes: 1 addition & 1 deletion examples/gp_potentials/cu_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
sys.path.append("../../")
from ase.io import Trajectory
from dask.distributed import Client, LocalCluster
from ml4chem import Potentials
from ml4chem.atomistic import Potentials
from ml4chem.utils import logger


Expand Down
2 changes: 1 addition & 1 deletion examples/gp_potentials/cu_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dask.distributed import Client, LocalCluster

sys.path.append("../../")
from ml4chem import Potentials
from ml4chem.atomistic import Potentials
from ml4chem.atomistic.features import Gaussian
from ml4chem.atomistic.models.gaussian_process import GaussianProcess
from ml4chem.utils import logger
Expand Down
Loading

0 comments on commit 5bc7808

Please sign in to comment.