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

mark check_estimator xfail #104

Merged
merged 2 commits into from
Sep 13, 2023
Merged
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
12 changes: 12 additions & 0 deletions tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import pytest
from cvxpy.error import SolverError
from sklearn.utils.estimator_checks import check_estimator
from sklearn.utils.fixes import threadpool_info

import sparselm.model as spm
from sparselm.model._miqp._base import MIQPl0
Expand Down Expand Up @@ -91,6 +92,17 @@ def test_add_constraints(estimator, random_model, rng):
estimator.fit(new_X, y)


@pytest.mark.xfail(
any(
True
for info in threadpool_info()
if info["internal_api"] == "openblas"
# Prudently assume Prescott might be the architecture if it is unknown.
and info.get("architecture", "prescott").lower() == "prescott"
),
reason="On Github runner above is true and sklearn will throw an error by trying to create_mmemap_backed_arrays "
"with an estimator.",
)
def test_sklearn_compatible(estimator):
"""Test sklearn compatibility with no parameter inputs."""
check_estimator(estimator)