-
Notifications
You must be signed in to change notification settings - Fork 587
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
Migrate DataTree
to the new IR
#3818
Conversation
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
in a previous iteration I did not call kill_branch when discarding. I've since addressed this in (I believe) a more principled way, by removing sub-ir examples and thus discards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The approach makes sense, and it looks like a good start!
Due to holiday season I'm going to unsubscribe from notifications on push, so please @-mention me to request review again when that would be useful (or at latest when CI is green) 🚀
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
a godsend of a function!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Zac-HD round two! I still have failing tests to address and things to investigate, but I've left some comments I've run into since the last update. Tests are looking a fair bit greener than last time 🙂
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
There looks to be some infinite loops (or very slow tests) here 😕. See https://github.com/HypothesisWorks/hypothesis/actions/runs/7733984648/job/21087140454?pr=3818, which I cancelled after 3.5 hours. I'll try to narrow it down locally. |
tracked the infinite loop down and fixed it: 5058f50 |
Seems to be a remaining flake: File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/tests/cover/test_error_in_draw.py", line 28, in test_error_is_in_finally
assert "[0, 1, -1]" in "\n".join(err.value.__notes__)
AssertionError: assert '[0, 1, -1]' in 'Falsifying example: test(\n d=data(...),\n)\nDraw 1: [1, 0, -20]'
+ where 'Falsifying example: test(\n d=data(...),\n)\nDraw 1: [1, 0, -20]' = <built-in method join of str object at 0x7f6f9665fe98>(['Falsifying example: test(\n d=data(...),\n)', 'Draw 1: [1, 0, -20]'])
+ where <built-in method join of str object at 0x7f6f9665fe98> = '\n'.join
+ and ['Falsifying example: test(\n d=data(...),\n)', 'Draw 1: [1, 0, -20]'] = ValueError().__notes__
+ where ValueError() = <ExceptionInfo ValueError() tblen=4>.value but I ran this locally, n ~= 10k, and it never failed. Maybe my transcription was unfaithful? There's also this failure, which I don't know how to interpret. Is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(short review because it's late, forgive terseness - I thought you'd prefer this now than a more effusive review next week)
- love it and looking forward to merging real soon now. Some style nitpicks in comments.
- I think the
INTERNAL ERROR
s look like they're transient flakes? Suspicious that it's only on Windows, we might have gotten a bad worker or something. Hopefully vanishes on retry. - From checking CI times this might be a slight slowdown? I think it's acceptable for now to get this in, and we can profile + optimize once we finish the big port - the design is not intrinsically any slower than the status quo (quite the opposite)
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
hypothesis-python/src/hypothesis/internal/conjecture/datatree.py
Outdated
Show resolved
Hide resolved
Yep, let's just move forward. I just merged the Black 2024 update so that's the formatting issue, and I think I've worked out the pytest crash too - I'll push a fix for those once the current merge finishes. And then if it's green... 🤞 |
🥳🥳🥳🥳🥳🥳 |
woo! |
Another step towards #3086.
forced
and forced testing #3846Potential follow-up work to this PR:
DataTree
to the new IR #3818 (comment))DataTree
to the new IR #3818 (comment))DataTree
to the new IR #3818 (comment))compute_max_children
(MigrateDataTree
to the new IR #3818 (comment))Conversations of note:
compute_max_children
(MigrateDataTree
to the new IR #3818 (comment))TooHard
(and alternatives) MigrateDataTree
to the new IR #3818 (comment)if observe and forced is None
performance comment MigrateDataTree
to the new IR #3818 (comment)DataTree
to the new IR #3818 (comment)