Skip to content

Commit

Permalink
Revert "import shift"
Browse files Browse the repository at this point in the history
This reverts commit fea72aa.
  • Loading branch information
GreatRSingh committed Aug 7, 2024
1 parent fea72aa commit e21a1eb
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions deepchem/data/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@
from deepchem.utils.genomics_utils import encode_bio_sequence

try:
from deepchem.feat.dft_data import DFTEntry
import yaml
from yaml.loader import SafeLoader
except (ImportError, ModuleNotFoundError) as e:
warnings.warn("PyYAML is not installed. Please install PyYAML to use the DataLoader class.")
except:
pass

try:
import pysam
except (ImportError, ModuleNotFoundError) as e:
warnings.warn("pysam is not installed. Please install pysam to use the DataLoader class.")
except:
pass

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -1879,7 +1880,6 @@ def _featurize_shard(self, shard):
-------
x: featurized shard (DFTEntry objects)
"""
from deepchem.feat.dft_data import DFTEntry
try:
e_type = shard['e_type']
if 'true_val' in shard.keys():
Expand Down
2 changes: 1 addition & 1 deletion deepchem/feat/dft_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from dqc.system.mol import Mol
from dqc.system.base_system import BaseSystem
from deepchem.utils.dftutils import KSCalc
except (ImportError, ModuleNotFoundError) as e:
except:
pass
from deepchem.utils.dft_utils import parse_moldesc, BaseGrid

Expand Down
2 changes: 1 addition & 1 deletion deepchem/models/dft/dftxc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Derived from https://github.com/mfkasim1/xcnn/blob/f2cb9777da2961ac553f256ecdcca3e314a538ca/xcdnn2/litmodule.py"""
from deepchem.models.dft.scf import XCNNSCF
import torch
from deepchem.models.dft.nnxc import HybridXC
import torch
from deepchem.models.losses import Loss, L2Loss
from deepchem.models.torch_models.torch_model import TorchModel
from typing import Tuple, Optional, List, Any
Expand Down
2 changes: 1 addition & 1 deletion deepchem/models/dft/nnxc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dqc.api.getxc import get_xc
from dqc.xc.base_xc import BaseXC
from dqc.utils.safeops import safenorm, safepow
except (ImportError, ModuleNotFoundError) as e:
except:
pass


Expand Down
2 changes: 1 addition & 1 deletion deepchem/models/tests/test_dens.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import torch
from deepchem.models.losses import DensityProfileLoss
has_dqc = True
except (ImportError, ModuleNotFoundError) as e:
except:
has_dqc = False
import numpy as np
import pytest
Expand Down
2 changes: 1 addition & 1 deletion deepchem/models/tests/test_nnxc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import torch.nn as nn
from dqc.utils.datastruct import ValGrad
has_dqc = True
except (ImportError, ModuleNotFoundError) as e:
except:
has_dqc = False


Expand Down

0 comments on commit e21a1eb

Please sign in to comment.