inducer / arraycontext

Choose your favorite numpy-workalike!
6 stars 11 forks source link

`test_array_context_np_workalike` may be flaky #233

Closed inducer closed 2 months ago

inducer commented 1 year ago

A failing test log:

_ test_array_context_np_workalike[<_PyOpenCLArrayContextForTests for <pyopencl.Device 'pthread-Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz' on 'Portable Computing Language'>>0-sum-1-complex64] _
[gw2] linux -- Python 3.11.3 /home/runner/work/pytato/pytato/arraycontext/.miniforge3/envs/testing/bin/python3
Traceback (most recent call last):
  File "/home/runner/work/pytato/pytato/arraycontext/test/test_arraycontext.py", line 391, in test_array_context_np_workalike
    assert_close_to_numpy_in_containers(actx, evaluate, args)
  File "/home/runner/work/pytato/pytato/arraycontext/test/test_arraycontext.py", line 307, in assert_close_to_numpy_in_containers
    assert_close_to_numpy(actx, op, args)
  File "/home/runner/work/pytato/pytato/arraycontext/test/test_arraycontext.py", line 298, in assert_close_to_numpy
    assert np.allclose(
AssertionError: assert False
 +  where False = <function allclose at 0x7ff320bf0680>(array(-0.20130634-0.00813293j, dtype=complex64), (-0.20131063-0.00812912j))
 +    where <function allclose at 0x7ff320bf0680> = np.allclose
 +    and   array(-0.20130634-0.00813293j, dtype=complex64) = <bound method PyOpenCLArrayContext.to_numpy of <test_arraycontext._PyOpenCLArrayContextForTests object at 0x7ff2f59e3690>>(cl.TaggableCLArray(-0.20130634-0.00813293j, dtype=complex64))
 +      where <bound method PyOpenCLArrayContext.to_numpy of <test_arraycontext._PyOpenCLArrayContextForTests object at 0x7ff2f59e3690>> = <test_arraycontext._PyOpenCLArrayContextForTests object at 0x7ff2f59e3690>.to_numpy
 +      and   cl.TaggableCLArray(-0.20130634-0.00813293j, dtype=complex64) = <function test_array_context_np_workalike.<locals>.evaluate at 0x7ff2f5a40400>(<arraycontext.impl.pyopencl.fake_numpy.PyOpenCLFakeNumpyNamespace object at 0x7ff30583e310>, *[cl.TaggableCLArray([-2.43978456e-01+0.12956458j,  9.78083789e-01+0.5325213j ,\n        1.09432292e+00+0.54306734j, -1.... -4.12956858e+00+0.09275813j,\n        4.27362353e-01-0.51016074j, -1.46767467e-01+0.9700044j ],\n      dtype=complex64)])
 +        where <arraycontext.impl.pyopencl.fake_numpy.PyOpenCLFakeNumpyNamespace object at 0x7ff30583e310> = <test_arraycontext._PyOpenCLArrayContextForTests object at 0x7ff2f59e3690>.np
 +    and   (-0.20131063-0.00812912j) = <function test_array_context_np_workalike.<locals>.evaluate at 0x7ff2f5a40400>(np, *[array([-2.43978456e-01+0.12956458j,  9.78083789e-01+0.5325213j ,\n        1.09432292e+00+0.54306734j, -1.12375605e+00+... -4.12956858e+00+0.09275813j,\n        4.27362353e-01-0.51016074j, -1.46767467e-01+0.9700044j ],\n      dtype=complex64)])

From https://github.com/inducer/pytato/actions/runs/5062185418/jobs/9087382913

inducer commented 2 months ago

Hasn't recurred in more than a year, closing.