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

test_SparseGPRegression_rbf_white_kern_1d test failure on powerpc64le arch #1054

Closed
Apteryks opened this issue Dec 19, 2023 · 8 comments
Closed
Labels
need more info If an issue or PR needs further information by the issuer

Comments

@Apteryks
Copy link

Hello,

Found by GNU Guix CI (https://ci.guix.gnu.org/build/2921270/)

[...]
test_SparseGPRegression_rbf_white_kern_1d (GPy.testing.model_tests.GradientTests)
Testing the sparse GP regression with rbf kernel with white kernel on 1d data ... initializing Y
initializing inference method
adding kernel and likelihood as parameters
Adding Z as parameter
FAIL
[...]

======================================================================
FAIL: test_SparseGPRegression_rbf_white_kern_1d (GPy.testing.model_tests.GradientTests)
Testing the sparse GP regression with rbf kernel with white kernel on 1d data
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-python-gpy-1.10.0.drv-0/GPy-1.10.0/GPy/testing/model_tests.py", line 788, in test_SparseGPRegression_rbf_white_kern_1d
    self.check_model(rbf, model_type='SparseGPRegression', dimension=1)
  File "/tmp/guix-build-python-gpy-1.10.0.drv-0/GPy-1.10.0/GPy/testing/model_tests.py", line 682, in check_model
    self.assertTrue(m.checkgrad())
AssertionError: False is not true

----------------------------------------------------------------------
Ran 274 tests in 466.921s

FAILED (failures=1, skipped=3)

Thanks!

@MartinBubel
Copy link
Contributor

Hi @Apteryks
could you please retry using GPy==1.13.1? Tests have been migrated from nose to pytest and some things have changed.

@MartinBubel MartinBubel added the need more info If an issue or PR needs further information by the issuer label Jan 16, 2024
@Apteryks
Copy link
Author

Hi! I just tried updating GPy to version 1.13.1, and I'm getting a syntax error in the mpi_test__.py file which seemingly uses Python 2 syntax:

testing/mpi_test__.py'...
***   File "/gnu/store/7gyd40a2zchj2j1s796v5393laxpvr9l-python-gpy-1.13.1/lib/python3.10/site-packages/GPy/testing/mpi_test__.py", line 16
    print float(m.objective_function())
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

Any tip?

@MartinBubel
Copy link
Contributor

Clearly, this is a something I overlooked when modernizing the tests.
I am a little confused why CI testing did not run into this 🤔 but anyways, thanks for reporting! I'll open up a branch on this one.

@MartinBubel
Copy link
Contributor

@Apteryks I am not sure how you are running the tests. Is there any way you can test if branch 1054-test_sparsegpregression_rbf_white_kern_1d-test-failure-on-powerpc64le-arch fixes this?

@Apteryks
Copy link
Author

Sorry, I meant to try it, but some other package is now failing some tests as well on that architecture now (python-werkzeug-2.0.2) so I'd have to fix that one first to test again.

@MartinBubel
Copy link
Contributor

Just saw this issue, as off now, could be considered a duplicate of #1056 (#1056 is newer but better descibres the underlying problem).

I'll probably start a PR on #1056 soon. If done, you can check whether that fix helps you out with this issue.
python-werkzeug is not a dependency of this GPy. Could you elaborate on the environment you are using so we can better test if it works im combination with GPy?

@Apteryks
Copy link
Author

So, I used the following command to build the latest source of GPy on a powerpc64le (offload) machine, and it seems to work:

$ guix build python-gpy --with-git-url=python-gpy=https://github.com/SheffieldML/GPy --with-branch=python-gpy=1054-test_sparsegpregression_rbf_white_kern_1d-test-failure-on-powerpc64le-arch --system=powerpc64le-linux --without-tests=python-werkzeug --without-tests=nss
[...]
GPy/testing/test_model.py::TestGradient::test_GPRegression_bias_kern_1D PASSED [ 60%]
GPy/testing/test_model.py::TestGradient::test_GPRegression_bias_kern_2D PASSED [ 61%]
GPy/testing/test_model.py::TestGradient::test_GPRegression_linear_kern_1D_ARD PASSED [ 61%]
GPy/testing/test_model.py::TestGradient::test_GPRegression_linear_kern_2D_ARD PASSED [ 61%]
GPy/testing/test_model.py::TestGradient::test_GPRegression_linear_kern_1D PASSED [ 62%]
GPy/testing/test_model.py::TestGradient::test_GPRegression_linear_kern_2D PASSED [ 62%]
GPy/testing/test_model.py::TestGradient::test_SparseGPRegression_rbf_white_kern_1d PASSED [ 62%]
GPy/testing/test_model.py::TestGradient::test_SparseGPRegression_rbf_white_kern_2D PASSED [ 63%]
GPy/testing/test_model.py::TestGradient::test_SparseGPRegression_rbf_linear_white_kern_1D PASSED [ 63%]
GPy/testing/test_model.py::TestGradient::test_SparseGPRegression_rbf_linear_white_kern_2D PASSED [ 64%]
GPy/testing/test_model.py::TestGradient::test_SparseGPRegression_rbf_white_kern_2D_uncertain_inputs PASSED [ 64%]
GPy/testing/test_model.py::TestGradient::test_SparseGPRegression_rbf_white_kern_1D_uncertain_inputs PASSED [ 64%]
GPy/testing/test_model.py::TestGradient::test_TPRegression_matern52_1D PASSED [ 65%]
GPy/testing/test_model.py::TestGradient::test_TPRegression_rbf_2D SKIPPED (No idea why this fails all of a sudden but need to go ahead.) [ 65%]
GPy/testing/test_model.py::TestGradient::test_TPRegression_rbf_ARD_2D PASSED [ 65%]
GPy/testing/test_model.py::TestGradient::test_TPRegression_matern52_2D PASSED [ 66%]
GPy/testing/test_model.py::TestGradient::test_TPRegression_matern52_ARD_2D PASSED [ 66%]
[...]
=== 255 passed, 15 skipped, 11 xfailed, 28336 warnings in 305.22s (0:05:05) ====
phase `check' succeeded after 306.4 seconds
[...]

As you can see I encountered other test failures in other packages on that architecture (python-werkzeug and nss) that are found somewhere in the transitive dependencies of python-gpy:

$ guix graph --path python-gpy python-werkzeug
python-gpy@1.13.1
python-pods@0.1.14
python-pandas@2.1.1
python-pytest-localserver@0.7.1
python-werkzeug@2.0.2

and

$ guix graph --path python-gpy nss
python-gpy@1.13.1
python-matplotlib@3.8.2
cairo@1.18.0
poppler@22.09.0
nss@3.88.1

I'll report Guix issues for these.

So it looks like this issue is fixed on the branch! Thank you!

@MartinBubel
Copy link
Contributor

Thanks for the checking @Apteryks . I'll close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info If an issue or PR needs further information by the issuer
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants