Skip to content

Commit 96d2097

Browse files
committed
add top_class_id to kwargs
- add top_class_id to kwargs, which is needed in _ChEBIDataExtractor class to create another chebi class object related to train version self._chebi_version_train_obj = self.__class__(single_class=self.single_class, **_init_kwargs,)
1 parent 03bf4cd commit 96d2097

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

chebai/preprocessing/datasets/chebi.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,9 @@ def __init__(self, top_class_id: int, **kwargs):
736736
top_class_id (int): The ID of the top class from which to extract subclasses.
737737
**kwargs: Additional keyword arguments passed to the superclass initializer.
738738
"""
739+
if "top_class_id" not in kwargs:
740+
kwargs["top_class_id"] = top_class_id
741+
739742
self.top_class_id: int = top_class_id
740743
super().__init__(**kwargs)
741744

0 commit comments

Comments
 (0)