Skip to content

Commit

Permalink
Use keyword args only for models. Small change to callback.
Browse files Browse the repository at this point in the history
  • Loading branch information
RAMitchell committed Feb 13, 2025
1 parent 4c15ea3 commit 2616e78
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions legateboost/legateboost.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ def _partial_fit(

# callbacks after iteration
if any(
(
[
c.after_iteration(self, model_idx, eval_result)
for c in self.callbacks
)
]
):
break

Expand Down
1 change: 1 addition & 0 deletions legateboost/models/krr.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class KRR(BaseModel):

def __init__(
self,
*,
n_components: int = 100,
alpha: Any = "deprecated",
l2_regularization: float = 1e-5,
Expand Down
1 change: 1 addition & 0 deletions legateboost/models/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Linear(BaseModel):

def __init__(
self,
*,
l2_regularization: float = 1e-5,
alpha: Any = "deprecated",
solver: str = "direct",
Expand Down
1 change: 1 addition & 0 deletions legateboost/models/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class NN(BaseModel):

def __init__(
self,
*,
max_iter: int = 100,
hidden_layer_sizes: Tuple[int] = (100,),
alpha: Any = "deprecated",
Expand Down
1 change: 1 addition & 0 deletions legateboost/models/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Tree(BaseModel):

def __init__(
self,
*,
max_depth: int = 8,
split_samples: int = 256,
l1_regularization: float = 0.0,
Expand Down

0 comments on commit 2616e78

Please sign in to comment.