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

Notebook CI failing #664

Closed
ascillitoe opened this issue Oct 21, 2022 · 2 comments · Fixed by #675
Closed

Notebook CI failing #664

ascillitoe opened this issue Oct 21, 2022 · 2 comments · Fixed by #675
Labels
Type: Bug Something isn't working Type: Testing Anything related to testing

Comments

@ascillitoe
Copy link
Contributor

Our notebook tests are failing with:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/pytest_randomly/__init__.py", line 194, in pytest_runtest_setup
    _reseed(item.config, -1)
  File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/pytest_randomly/__init__.py", line 172, in _reseed
    reseed(seed)
  File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/site-packages/thinc/util.py", line 70, in fix_random_seed
    numpy.random.seed(seed)
  File "mtrand.pyx", line 246, in numpy.random.mtrand.RandomState.seed
  File "_mt19937.pyx", line 1[66](https://github.com/SeldonIO/alibi-detect/actions/runs/3257690768/jobs/5349135028#step:5:67), in numpy.random._mt19937.MT19937._legacy_seeding
  File "_mt19937.pyx", line 180, in numpy.random._mt19937.MT19937._legacy_seeding
ValueError: Seed must be between 0 and 2**32 - 1

It appears to involve the numpy seed setting, pytest_randomly, and thinc. Perhaps thinc's pytest_randomly entry point is overriding ours?

Requires further investigation...

@ascillitoe ascillitoe added Type: Bug Something isn't working Type: Testing Anything related to testing labels Oct 21, 2022
@ascillitoe
Copy link
Contributor Author

This error only occurs when thinc>=8.1.3 is installed. 8.1.3 included a fix for the thinc pytest-randomly entry point (explosion/thinc#775), so it seems this is now overriding our own.

@ascillitoe
Copy link
Contributor Author

For reference: pytest-dev/pytest-randomly#495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working Type: Testing Anything related to testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant