Sm00thix / IKPLS

Fast CPU and GPU Python implementations of Improved Kernel PLS by Dayal and MacGregor (1997) and Shortcutting Cross-Validation by Engstrøm (2024).
https://ikpls.readthedocs.io/en/latest/
Apache License 2.0
8 stars 3 forks source link

tests are broken as of 816ff7b #22

Closed parmentelat closed 3 months ago

parmentelat commented 3 months ago

it seems that commit 816ff7b has - badly enough - broken the tests

Sm00thix commented 3 months ago

Hi @parmentelat ,

Can you share the specific error message that you get? The tests work fine on my local machine as well as the 12 different instances on GitHub Actions as shown here https://github.com/Sm00thix/IKPLS/actions/runs/9403012339

parmentelat commented 3 months ago
pytest -v tests/test_ikpls.py::TestClass::test_pls_1
=========================================================================== test session starts ============================================================================
platform darwin -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0 -- /Users/tparment/miniconda3/envs/ikpls/bin/python3.12
cachedir: .pytest_cache
rootdir: /Users/tparment/git/IKPLS
configfile: pyproject.toml
plugins: anyio-4.3.0
collected 1 item

tests/test_ikpls.py::TestClass::test_pls_1 FAILED                                                                                                                    [100%]

================================================================================= FAILURES =================================================================================
___________________________________________________________________________ TestClass.test_pls_1 ___________________________________________________________________________

<snip>
        diff_jax_pls_alg_1 = JAX_Alg_1(reverse_differentiable=True, verbose=True)
        diff_jax_pls_alg_2 = JAX_Alg_2(reverse_differentiable=True, verbose=True)

>       sk_pls.fit(X=X, y=Y)
E       TypeError: PLSRegression.fit() got an unexpected keyword argument 'y'

tests/test_ikpls.py:127: TypeError
========================================================================= short test summary info ==========================================================================
FAILED tests/test_ikpls.py::TestClass::test_pls_1 - TypeError: PLSRegression.fit() got an unexpected keyword argument 'y'
============================================================================ 1 failed in 47.33s ============================================================================
Sm00thix commented 3 months ago

Thank you @parmentelat ,

I seem to have missed an update in the requirements section in pyproject.toml. I have now updated the dependency to require at least scikit-learn 1.5.0. That should take care of the issue. It has been committed in b176fea.

Will you confirm that this solves the issue?

Sm00thix commented 3 months ago

I forgot to update the version number in b176fea. It has been updated in 76a66ae.

parmentelat commented 3 months ago

Will you confirm that this solves the issue?

I do, this same test does pass now