Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pixi lockfile #907

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8,701 changes: 4,611 additions & 4,090 deletions pixi.lock

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/glum/_glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3032,8 +3032,7 @@ def _validate_hyperparameters(self) -> None:
if self.alpha_search:
if not isinstance(self.alpha, Iterable) and self.alpha is not None:
raise ValueError(
"`alpha` should be an Iterable or None when `alpha_search`"
" is True"
"`alpha` should be an Iterable or None when `alpha_search` is True"
)
if self.alpha is not None and (
(np.asarray(self.alpha) < 0).any()
Expand All @@ -3043,7 +3042,7 @@ def _validate_hyperparameters(self) -> None:
if not self.alpha_search:
if not np.isscalar(self.alpha) and self.alpha is not None:
raise ValueError(
"`alpha` should be a scalar or None when `alpha_search`" " is False"
"`alpha` should be a scalar or None when `alpha_search` is False"
)
if self.alpha is not None and (
not isinstance(self.alpha, (int, float)) or self.alpha < 0
Expand Down
2 changes: 1 addition & 1 deletion src/glum/_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def _lbfgs_solver(
)
if info["warnflag"] == 1:
warnings.warn(
"lbfgs failed to converge." " Increase the number of iterations.",
"lbfgs failed to converge. Increase the number of iterations.",
ConvergenceWarning,
)
elif info["warnflag"] == 2:
Expand Down
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
4 changes: 0 additions & 4 deletions tests/glm/test_glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2810,10 +2810,6 @@ def test_drop_first_allows_alpha_equals_0():
regressor = GeneralizedLinearRegressor(drop_first=True)
regressor.fit(X, y)

regressor = GeneralizedLinearRegressor() # default is False
with pytest.raises(np.linalg.LinAlgError):
regressor.fit(X, y)


def test_dropping_distinct_categorical_column():
y = np.random.normal(size=10)
Expand Down
Loading