-
Notifications
You must be signed in to change notification settings - Fork 45
test_solve - hypothesis.errors.InvalidArgument: min_size=8_325 is larger than Hypothesis is designed to handle while generating 'x2' #238
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
Comments
Was able to reproduce in a debugger, but this is deep in hypothesis code. This looks like it's probably a hypothesis bug? Most likely one introduced since 6.97.1, which was the version I was previously using locally. It seems to be having an issue with generating a list of 8000 elements in order to generate an array, but we generate arrays of that size all the time (our MAX_ARRAY_SIZE is 10000). If this really is an issue with my strategy and not a hypothesis bug, there is a meta-hypothesis issue in that the error is completely incoherent. |
Nothing stands out to me in the changelog, but I ran tens of thousands of examples in 6.97.1 and didn't get this error. |
Also confirmed that |
By the way, to reproduce this you may need to run against data-apis/array-api-compat#93 (numpy backend) |
Seems like this was a recent change in hypothesis, but maybe the arrays() strategy was never updated HypothesisWorks/hypothesis#3896? I'm still confused why my solve strategy only is hitting this. CC @Zac-HD |
So you see what I mean about the error message being unhelpful? :) To reproduce, checkout this branch data-apis/array-api-compat#93, then run
in this repo. I linked to the relevant strategy above. I don't think there's any |
I've now spent more than an hour unsuccesfully trying to observe this error. Can you give me a single-file reproducer with minimal dependencies? |
I'll see what I can do on Monday. There are definitely a lot of moving parts here. It might be best to wait for @honno. I believe he is on vacation until late next week. |
For me,
reproduces the error. No need to use array-api-compat. This time the error looked like
This is with hypothesis 6.98.17 |
This is needed until data-apis/array-api-tests#238 is fixed.
This is needed until data-apis/array-api-tests#238 is fixed.
The reason I'm asking for a single-file repro is to have a small enough volume of code that I can tell why you're hitting this error. I'm fairly confident that it's inside your strategy, but knowing how will help improve the message etc. ...and while staring at that message again, I think part of the problem is that we're raising an exception before assigning all the attributes used in the |
Try installing Hypothesis from HypothesisWorks/hypothesis@master...Zac-HD:hypothesis:fix-lists-error:
|
What an I missing here? It seems to have installed your branch, https://github.com/data-apis/array-api-compat/actions/runs/8208903123/job/22453311483?pr=102#step:5:61, but the traceback doesn't look it has your update with the check moved lower in
|
I think it's actually using this earlier install: https://github.com/data-apis/array-api-compat/actions/runs/8208903123/job/22453311483?pr=102#step:5:47 - maybe try uninstalling first, then installing from github? In any case I've now released those changes in Hypothesis 6.98.18, so you can install that by version. |
Brill very handy @Zac-HD 😁
So yeah the error could of been more specific but it looks like an issue with the |
Here's the error message from the latest version of hypothesis:
|
yep, that's your problem. |
I'm not completely clear from the information given what the issue is. I don't see any issues with the arrays generated for test_solve https://github.com/data-apis/array-api-tests/blob/master/array_api_tests/test_linalg.py#L592, nor have I seen this error before.
The text was updated successfully, but these errors were encountered: