Skip to content

Commit

Permalink
see if sklearn is sabotaging tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lbluque committed Sep 13, 2023
1 parent 3b5c8de commit 0849b1d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 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 @@ -93,4 +94,12 @@ def test_add_constraints(estimator, random_model, rng):

def test_sklearn_compatible(estimator):
"""Test sklearn compatibility with no parameter inputs."""
has_prescott_openblas = 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"
)
print("this claims to be prescott!!!", has_prescott_openblas)
check_estimator(estimator)

0 comments on commit 0849b1d

Please sign in to comment.