Skip to content

Commit

Permalink
fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb committed Feb 16, 2021
1 parent fd62b82 commit 6eee3c4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions scikeras/utils/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,4 +419,5 @@ def transform(self, data: Dict[str, Any]) -> Dict[str, Any]:
sample_weight = 1 if sample_weight is None else sample_weight
sample_weight *= compute_sample_weight(class_weight=self.class_weight, y=y)
data["sample_weight"] = sample_weight
data["class_weight"] = None
return data
2 changes: 0 additions & 2 deletions scikeras/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,6 @@ def _initialize(
self.dataset_transformer_ = self.dataset_transformer.fit(
dict(x=X, y=y, sample_weight=sample_weight)
)
dataset_meta = getattr(self.dataset_transformer_, "get_metadata", dict)()
vars(self).update(**dataset_meta)

return X, y, sample_weight

Expand Down

0 comments on commit 6eee3c4

Please sign in to comment.