Skip to content

Commit

Permalink
forgot some
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcAntoineSchmidtQC committed Feb 19, 2025
1 parent 923bbdc commit 533d536
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/glum_benchmarks/bench_liblinear.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def liblinear_bench(
solver="liblinear",
)

fit_args = dict(
fit_args = dict( # type: ignore
X=X,
y=dat["y"].astype(np.int64).copy(),
sample_weight=dat.get("sample_weight"),
Expand Down
4 changes: 2 additions & 2 deletions src/glum_benchmarks/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ def get_obj_val(
X_dot_coef += offset

zeros = np.zeros(dat["X"].shape[0])
y = dat["y"].astype(coefs.dtype)
weights = dat.get("weights", np.ones_like(y)).astype(coefs.dtype)
y = dat["y"].astype(coefs.dtype) # type: ignore
weights = dat.get("weights", np.ones_like(y)).astype(coefs.dtype) # type: ignore
weights /= weights.sum()
P1 = l1_ratio * alpha * np.ones_like(coefs)
P2 = (1 - l1_ratio) * alpha * np.ones_like(coefs)
Expand Down

0 comments on commit 533d536

Please sign in to comment.