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

Flaky test (always fails) when seeds are removed #945

Open
crawlingcub opened this issue Oct 1, 2021 · 1 comment
Open

Flaky test (always fails) when seeds are removed #945

crawlingcub opened this issue Oct 1, 2021 · 1 comment

Comments

@crawlingcub
Copy link

Hi,

The test test_randn_non_zero_imag in tensornetwork/backends/symmetric/symmetric_backend_test.py link always fails when the seeds are removed. The test only fails for parameters: [2-complex64-2] and [2-complex128-2], but passes for all other parameters. In particular, the assertion at line 490 fails (500 fails out of 500 runs).

Is this expected behavior? Or indicative of a bug or some approximations? Please let me know if you need more info. Thanks!

Error message:

>     assert np.linalg.norm(np.imag(actual.data)) != 0.0
E     AssertionError: assert 0.0 != 0.0
E      +  where 0.0 = <function norm at 0x7fc3575258c8>(array([], dtype=float64))
E      +    where <function norm at 0x7fc3575258c8> = <module 'numpy.linalg' from '/...s/TensorNetwork/lib/python3.6/site-packages/numpy/linalg/__init__.py'>.norm
E      +      where <module 'numpy.linalg' from '/.../envs/TensorNetwork/lib/python3.6/site-packages/numpy/linalg/__init__.py'> = np.linalg
E      +    and   array([], dtype=float64) = <function imag at 0x7fc35799ebf8>(array([], dtype=complex128))
E      +      where <function imag at 0x7fc35799ebf8> = np.imag
E      +      and   array([], dtype=complex128) = BlockSparseTensor\n   shape: (10, 10)\n   charge types: ['U1Charge', 'U1Charge']\n   dtype: 'complex128'\n   flat flows: [False, False]\n   order: [[0], [1]].\
data

tensornetwork/backends/symmetric/symmetric_backend_test.py:490: AssertionError
@crawlingcub
Copy link
Author

Adding @mganahl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant