Skip to content

Commit 41d40a4

Browse files
committed
Merge branch 'thesis_augmented_gnn' of https://github.com/ChEB-AI/python-chebai-graph into thesis_augmented_gnn
2 parents 0444131 + 2d8d116 commit 41d40a4

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

chebai_graph/models/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from abc import ABC, abstractmethod
2+
from typing import Optional
23

34
import torch
45
from chebai.models.base import ChebaiBaseNet
@@ -73,7 +74,7 @@ class GraphNetWrapper(GraphBaseNet, ABC):
7374
"""
7475

7576
def __init__(
76-
self, config: dict, n_linear_layers: int, n_molecule_properties: int, **kwargs
77+
self, config: dict, n_linear_layers: int, n_molecule_properties: Optional[int] = 0, **kwargs
7778
) -> None:
7879
"""
7980
Initialize the GNN and linear layers.
@@ -90,7 +91,7 @@ def __init__(
9091
self.activation = torch.nn.ELU
9192
self.lin_input_dim = self._get_lin_seq_input_dim(
9293
gnn_out_dim=gnn_out_dim,
93-
n_molecule_properties=n_molecule_properties,
94+
n_molecule_properties=n_molecule_properties if n_molecule_properties is not None else 0,
9495
)
9596

9697
lin_hidden_dim = kwargs.get("lin_hidden_dim", gnn_out_dim)

chebai_graph/preprocessing/datasets/chebi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,3 +753,7 @@ class ChEBI50_Atom_WGNOnly_GraphProp(AugGraphPropMixIn_WithGraphNode, ChEBIOver5
753753

754754
class ChEBI50_WFGE_WGN_AsPerNodeType(GraphPropAsPerNodeType, ChEBIOver50):
755755
READER = AtomFGReader_WithFGEdges_WithGraphNode
756+
757+
758+
class ChEBI100_WFGE_WGN_AsPerNodeType(GraphPropAsPerNodeType, ChEBIOver100):
759+
READER = AtomFGReader_WithFGEdges_WithGraphNode

0 commit comments

Comments
 (0)