Skip to content

Commit 80205bc

Browse files
committed
cli: data typehint for data param
1 parent 8136a4d commit 80205bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

chebai/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from typing import Dict, Set
1+
from typing import Dict, Set, Type
22

33
from lightning.pytorch.cli import LightningArgumentParser, LightningCLI
44

5+
from chebai.preprocessing.datasets import XYBaseDataModule
56
from chebai.trainer.CustomTrainer import CustomTrainer
67

78

@@ -39,7 +40,7 @@ def add_arguments_to_parser(self, parser: LightningArgumentParser):
3940
parser (LightningArgumentParser): Argument parser instance.
4041
"""
4142

42-
def call_data_methods(data):
43+
def call_data_methods(data: Type[XYBaseDataModule]):
4344
if data._num_of_labels is None:
4445
data.prepare_data()
4546
data.setup()

0 commit comments

Comments
 (0)