Skip to content

Commit

Permalink
lint: docstrings and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JenniferHem committed Sep 3, 2024
1 parent 4a117d5 commit fdb1d31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions molpipeline/estimators/chemprop/component_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ def __init__(
Threshold for binary classification.
output_transform : UnscaleTransform or None, optional (default=None)
Transformations to apply to the output. None defaults to UnscaleTransform.
kwargs : Any
Additional keyword arguments.
"""
if task_weights is None:
task_weights = torch.ones(n_tasks)
Expand Down
7 changes: 3 additions & 4 deletions test_extras/test_chemprop/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
BondMessagePassing,
MeanAggregation,
MulticlassClassificationFFN,
BinaryClassificationFFN,
RegressionFFN,
SumAggregation,
)
Expand Down Expand Up @@ -251,12 +250,12 @@ def test_error_for_multiclass_predictor(self) -> None:
with self.assertRaises(ValueError):
predictor = MulticlassClassificationFFN(n_classes=2)
model = MPNN(message_passing=bond_encoder, agg=agg, predictor=predictor)
chemprop_model = ChempropMulticlassClassifier(n_classes=2, model=model)
ChempropMulticlassClassifier(n_classes=2, model=model)
with self.assertRaises(ValueError):
predictor = MulticlassClassificationFFN(n_classes=3)
model = MPNN(message_passing=bond_encoder, agg=agg, predictor=predictor)
chemprop_model = ChempropMulticlassClassifier(n_classes=4, model=model)
ChempropMulticlassClassifier(n_classes=4, model=model)
with self.assertRaises(AttributeError):
predictor = RegressionFFN()
model = MPNN(message_passing=bond_encoder, agg=agg, predictor=predictor)
chemprop_model = ChempropMulticlassClassifier(n_classes=4, model=model)
ChempropMulticlassClassifier(n_classes=4, model=model)

0 comments on commit fdb1d31

Please sign in to comment.