Skip to content

Commit 9a79998

Browse files
committed
add dummy labels
1 parent a75c782 commit 9a79998

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

chebifier/prediction_models/electra_predictor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def explain_smiles(self, smiles) -> dict:
6363
from chebai.preprocessing.reader import EMBEDDING_OFFSET
6464

6565
reader = self.reader_cls()
66-
token_dict = reader.to_data(dict(features=smiles, labels=None))
66+
token_dict = reader.to_data(dict(features=smiles, labels=[1, 2])) # dummy label
6767
tokens = np.array(token_dict["features"]).astype(int).tolist()
6868
result = self.calculate_results([token_dict])
6969

chebifier/prediction_models/gnn_predictor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ def init_model(self, ckpt_path: str, **kwargs) -> "ResGatedGraphPred":
7777
def read_smiles(self, smiles):
7878
from chebai_graph.preprocessing.datasets.chebi import GraphPropAsPerNodeType
7979

80-
d = self.dataset.READER().to_data(dict(features=smiles, labels=None))
80+
d = self.dataset.READER().to_data(
81+
dict(features=smiles, labels=[1, 2])
82+
) # dummy label
8183
property_data = d
8284
# TODO merge props into base should not be a method of a dataset (or at least static)
8385
for property in self.dataset.properties:

chebifier/prediction_models/nn_predictor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def batchify(self, batch):
5050
yield cache
5151

5252
def read_smiles(self, smiles):
53-
d = self.reader.to_data(dict(features=smiles, labels=None))
53+
d = self.reader.to_data(dict(features=smiles, labels=[1, 2])) # dummy label
5454
return d
5555

5656
@modelwise_smiles_lru_cache.batch_decorator

0 commit comments

Comments
 (0)