Skip to content

Commit

Permalink
removing unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
c-w-feldmann committed Apr 25, 2024
1 parent 11cdd8e commit 83cd8b5
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions molpipeline/estimators/chemprop/component_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
)
from chemprop.nn.transforms import UnscaleTransform
from chemprop.nn.utils import Activation, get_activation_function
from chemprop.utils.registry import Factory
from sklearn.base import BaseEstimator
from torch import Tensor, nn

Expand Down Expand Up @@ -165,13 +164,8 @@ def __init__(
output_transform : UnscaleTransform or None, optional (default=None)
Transformations to apply to the output. None defaults to UnscaleTransform.
"""
if criterion is None:
task_weights = torch.ones(n_tasks) if task_weights is None else task_weights
criterion = Factory.build(
self._T_default_criterion,
task_weights=task_weights,
threshold=threshold,
)
if task_weights is None:
task_weights = torch.ones(n_tasks)
super().__init__(
n_tasks=n_tasks,
input_dim=input_dim,
Expand Down

0 comments on commit 83cd8b5

Please sign in to comment.