Skip to content

Commit

Permalink
fix up acanet demo
Browse files Browse the repository at this point in the history
  • Loading branch information
amva13 committed Sep 8, 2024
1 parent 0f0e6e5 commit 56c3da4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tdc/single_pred/mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@ def get_from_gh(self, link):
return self.data

def get_data(self, link=None, get_from_gh=True):
if (not get_from_gh) and link is None:
raise Exception(
"provide dataset github link from https://github.com/bidd-group/MPCD"
)
elif get_from_gh:
link = link if link is not None else self.name
if get_from_gh:
return self.get_from_gh(link)
# support direct interfface with MoleculeACE API as well
from MoleculeACE import Data, Descriptors
Expand Down
9 changes: 9 additions & 0 deletions tdc/test/test_dataloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,15 @@ def test_resource_dataverse_dataloader_raw_splits(self):
pd.DataFrame)
assert not splits["dev"]

def test_mpc(self):
from tdc.single_pred.mpc import MPC
Xs = MPC(name = "https://raw.githubusercontent.com/bidd-group/MPCD/main/dataset/ADMET/DeepDelta_benchmark/Caco2.csv")
Xs_split = Xs.get_split()
Xs_train = Xs_split["train"]
Xs_test = Xs_split["test"]
y_train_pIC50 = Xs_train["Y"]
y_test_pIC50 = Xs_test["Y"]

def tearDown(self):
try:
print(os.getcwd())
Expand Down

0 comments on commit 56c3da4

Please sign in to comment.