Skip to content

Commit

Permalink
Remove custom equality comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
RAMitchell committed Nov 18, 2024
1 parent 4c0823d commit 7c8a804
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
8 changes: 0 additions & 8 deletions legateboost/models/krr.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,3 @@ def __mul__(self, scalar: Any) -> "KRR":
new = copy.deepcopy(self)
self.betas_ *= scalar
return new

def __eq__(self, other: object) -> bool:
if not isinstance(other, KRR):
raise NotImplementedError()
return bool(
(other.betas_ == self.betas_).all()
and (other.X_train == self.X_train).all()
)
5 changes: 0 additions & 5 deletions legateboost/models/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,3 @@ def __mul__(self, scalar: Any) -> "Linear":
new = copy.deepcopy(self)
new.betas_ *= scalar
return new

def __eq__(self, other: object) -> bool:
if not isinstance(other, Linear):
raise NotImplementedError()
return bool((other.betas_ == self.betas_).all())

0 comments on commit 7c8a804

Please sign in to comment.