diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index fe0975465..8892cec44 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -59,12 +59,6 @@ jobs: - name: Install basic dependencies run: | python -m pip install -e .[tests] -f https://download.pytorch.org/whl/torch_stable.html - - name: Test with older SKLearn on Linux with py3.9 to check backward compatibility - if: ${{ matrix.python-version == '3.9' && startsWith(matrix.os, 'ubuntu') == true }} - run: python -m pip install scikit-learn==1.2.1 numpy==1.26.4 - - name: Pin SKLearn<1.5.0 on not Linux with py3.9 - if: ${{ !(matrix.python-version == '3.9' && startsWith(matrix.os, 'ubuntu') == true) }} - run: python -m pip install "scikit-learn<1.5.0" numpy==1.26.4 - name: Run basic tests without extra run: pytest - name: Coverage on basic tests without extra diff --git a/hummingbird/ml/operator_converters/_decomposition_implementations.py b/hummingbird/ml/operator_converters/_decomposition_implementations.py index 6a03d9316..9325a43f3 100644 --- a/hummingbird/ml/operator_converters/_decomposition_implementations.py +++ b/hummingbird/ml/operator_converters/_decomposition_implementations.py @@ -96,6 +96,5 @@ def __init__(self, logical_operator, x_mean, x_std, y_mean, coefficients, device def forward(self, x): x -= self.x_mean - x /= self.x_std y_pred = torch.mm(x, self.coefficients).float() return y_pred + self.y_mean diff --git a/setup.py b/setup.py index f7b686452..c4ed6d53e 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ "onnxconverter-common>=1.6.0", "onnx<=1.16.1", "scipy", - "scikit-learn", + "scikit-learn>=1.5.0", "torch>1.7.0", "psutil", "dill",