Skip to content

Fix failing tests and pytest-randomly#205

Merged
maltanar merged 4 commits intomainfrom
fix/pytest_np_seed
Oct 2, 2025
Merged

Fix failing tests and pytest-randomly#205
maltanar merged 4 commits intomainfrom
fix/pytest_np_seed

Conversation

@maltanar
Copy link
Collaborator

@maltanar maltanar commented Sep 30, 2025

Fixes several recently-observed errors causing the test suite to fail

  1. Fix errors with seed size limit in old-style numpy RNG API like:
  File "mtrand.pyx", line 244, in numpy.random.mtrand.RandomState.seed
  File "_mt19937.pyx", line 166, 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

A better fix would be to follow numpy/numpy#17079 but this requires reworking the QONNX RNGs a bit more, postponed for now.

  1. Restrict onnxscript version to avoid version conflicts of the ml_dtypes package. newer versions of onnxscript need ml_dtypes>=0.5 but at the moment we have tensorflow>=2.9.0, <=2.14.1 in qonnx requirements due to QKeras, which pins ml_dtypes==0.2.0

  2. Add xfail to test_floatquant tests which seem to have broken due to some interface change, pending further investigation.

@maltanar maltanar changed the title [Test] restrict npy seed from pytest-randomly to mod 2**32 Fix failing tests and pytest-randomly Oct 2, 2025
@maltanar maltanar merged commit c494f50 into main Oct 2, 2025
3 checks passed
@maltanar maltanar deleted the fix/pytest_np_seed branch October 2, 2025 07:36
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

Successfully merging this pull request may close these issues.

1 participant