We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f253446 commit 992b48cCopy full SHA for 992b48c
chebai/cli.py
@@ -39,9 +39,19 @@ def add_arguments_to_parser(self, parser: LightningArgumentParser):
39
parser (LightningArgumentParser): Argument parser instance.
40
"""
41
42
+ def call_data_methods(data):
43
+ if data._num_of_labels is None:
44
+ data.prepare_data()
45
+ data.setup()
46
+ return data.num_of_labels
47
+
48
parser.link_arguments(
- "data.num_of_labels", "model.init_args.out_dim", apply_on="instantiate"
49
+ "data",
50
+ "model.init_args.out_dim",
51
+ apply_on="instantiate",
52
+ compute_fn=call_data_methods,
53
)
54
55
56
"data.feature_vector_size",
57
"model.init_args.input_dim",
0 commit comments