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 1c629ff commit 3166bb3Copy full SHA for 3166bb3
chebai/loss/bce_weighted.py
@@ -32,6 +32,11 @@ def __init__(
32
if isinstance(data_extractor, LabeledUnlabeledMixed):
33
data_extractor = data_extractor.labeled
34
self.data_extractor = data_extractor
35
+
36
+ # If beta is provided, require a data_extractor.
37
+ if self.beta is not None and self.data_extractor is None:
38
+ raise ValueError("When 'beta' is set, 'data_extractor' must also be set.")
39
40
assert (
41
isinstance(self.data_extractor, _ChEBIDataExtractor)
42
or self.data_extractor is None
0 commit comments