-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
174 commits
Select commit
Hold shift + click to select a range
9b356da
initial work on datatree ir migration
tybug cae9b3b
remove outdated comment
tybug b083a4f
move choice() method to ConjectureData
tybug b86ae5b
fix label name collision
tybug 0095ec0
fix almost all shrinker tests
tybug 4ab7c6e
fix optimiser tests
tybug 9a01468
remove test duplicated in test_pareto
tybug 842b732
fix most engine tests
tybug 5c335e1
fix most pareto tests
tybug 833c4cd
fix wrong data.choice usage
tybug 23eafff
use existing count_between_floats
tybug 1958a4c
migrate draw_bits in test_test_data
tybug ff0ffe6
migrate draw_bits in test_shrinking_dfas
tybug 98947c4
remove ConjectureData#write in favor of draw_bytes(forced=...)
tybug d219cbf
remove test_draw_write_round_trip. This is better covered by test_for…
tybug 720c750
fix test_float_encoding tests via buffers
tybug 4b0a103
more ConjectureData#write / draw_bytes fixes
tybug 98c93b3
add DRAW_FLOAT_INNER_LABEL to bring float shrinking back to normal
tybug 6ed83ae
improve `minimal` readability with nonlocal
tybug 56d78f1
add and use MAX_CHILDREN_EFFECTIVELY_INFINITE
tybug 8a5a163
add cached_property comment
tybug dc95a63
use bit representation of floats for keys
tybug 70f9c35
use unweighted sampling if rejection sampling is not making progress
tybug 57fc9ac
more draw_bits -> draw_integer migrations
tybug 8ea0dae
avoid 32 bit integers which draws more data
tybug 4177416
fix test_example_depth_marking
tybug 84a9eb3
spacing
tybug 3f87784
fix test_child_indices for additional draw_boolean examples
tybug 56613bc
add TODO for DRAW_BYTES_LABEL
tybug 01b5cf3
increase test_last_block_length buffer to account for >24 bit integers
tybug 4e314a1
fix test_can_observe_draws
tybug 39d3436
more correct test_can_write_empty_bytes test
tybug 4ab240d
never write exact-value pseudo choices to the IR
tybug bb2ba67
Merge branch 'various-core-touchups' into 'datatree-ir'
tybug 12efba8
simplify compute_max_children for integers
tybug bacf301
Merge branch 'master' into datatree-ir
tybug 46a0b1f
rename forced -> was_forced in observer
tybug 142a13d
formatting
tybug e81d0ad
document `observe` argument
tybug 4490070
add TODO for draw_bytes min/max size
tybug a154d56
update explore_arbitrary_languages test
tybug 38e758b
note string values in test
tybug a854245
condition test_basic_indices_options on tuples, add more cases
tybug 3e8a051
formatting
tybug a42c06c
move Intervals strategy to common
tybug b5178e5
factor our ir kwarg generation into tests.conjecture.common
tybug 0bb0763
add draw_bytes size assert
tybug bfacdd2
fix incorrect draw_bits migrations
tybug dbbe785
handle empty intervals case in compute_max_children
tybug a1896b9
more reasonable draw_string_kwargs sizes
tybug 97f96aa
linting
tybug b118cf0
add tests for single-value "choices" not writing to bistream
tybug 1b6c46a
formatting
tybug 99345f8
condition test_basic_indices_options on tuples, add more cases
tybug a74e468
move Intervals strategy to common
tybug ec3fe52
factor our ir kwarg generation into tests.conjecture.common
tybug 46220fd
add draw_bytes size assert
tybug 566f88e
fix incorrect draw_bits migrations
tybug 03f22b0
more reasonable draw_string_kwargs sizes
tybug 9970233
formatting
tybug 77cd157
remove ConjectureData#write in favor of draw_bytes(forced=...)
tybug 5e5e4e1
more ConjectureData#write / draw_bytes fixes
tybug 76c48dc
update explore_arbitrary_languages test
tybug c6f1f8a
formatting
tybug cc58f53
migrate more draw_bits
tybug e706709
update test_dependent_block_pairs_is_up_to_shrinking_integers
tybug 1b5c376
fix draw_float_kwargs for nan forced
tybug 6df50bd
fix draw_string_kwargs computation
tybug 6d24152
fix test_can_write_empty_bytes
tybug e41514b
rewrite float drawing for nan/clamper interaction
tybug 017f20b
Merge branch 'master' of https://github.com/tybug/hypothesis into var…
tybug db69f87
Merge branch 'master' into various-touchups-2
tybug c5fba69
remove forgotten debug statement
tybug baf67f7
implement forced for out of bounds p in draw_boolean
tybug 057271b
better draw_integers_kwargs comments and weights
tybug 7e31ebd
rewrite nan/clamper handling, again
tybug 156cfd0
add release notes
tybug 8583a2d
return False with p=0, even if forced True
tybug 7e2f80a
rework forced sampling to account for 0 probabilities
tybug f15ef5f
oops
tybug 23f5e91
Merge branch 'master' into datatree-ir
tybug 4c2e0c3
update test_integer_range_lower_equals_upper
tybug 3cc51d4
update test_regression_1
tybug d72adfd
rewrite for clarity in Sampler.sample
tybug 993b51b
more clear assume statement
tybug c760c55
improve draw_integer_kwargs distribution and speed
tybug d227ab8
add invariant to comment
tybug f0cd78b
improve draw_string_kwargs distribution and performance
tybug 372a3e2
improve weight drawing in draw_integer_kwargs
tybug 234f2ea
apparently 64 bit boolean draws are totally fine!
tybug a0e9cfb
fix accidentally weakened forced testing
tybug 8a503f1
typo
tybug 46cf059
rename intervals strategies, improve speed
tybug b4b88c5
change test format to avoid st.data()
tybug c3edf81
add use_{min, max}_value to draw_float_kwargs
tybug 9b67c03
dont force sign bit if nans are allowed
tybug 214b6c4
Merge branch 'test-forced-improvements' into datatree-ir
tybug 575fd0e
Merge branch 'master' into datatree-ir
tybug 280434f
revert fixed workaround for non-str notes
tybug 9d1d316
delete release
tybug e2e820f
change outdated reference to draw_bits
tybug 43506a9
fix compute_max_children case for integers, add simple test case
tybug 007cc9d
add test for differentiating between 0.0 and -0.0 float draws
tybug 3eb27b2
fix draw_string with single interval and equal bounds, and add test
tybug 21db4bb
add IRType type alias
tybug 6e42732
simplify helpers in generate_novel_prefix
tybug 1b47296
import BUFFER_SIZE instead of redefining
tybug f575070
rewrite datatree documentation
tybug bfb8e69
avoid TypeAlias errors on python < 3.10
tybug b383a5c
extract draw_string max size to shared var
tybug aa999ba
move max_children > 1 assert
tybug b91783d
mark was_forced as keyword only
tybug f21b74d
use unbiased kwargs in data tree when stuck
tybug ff46d20
Merge branch 'master' into datatree-ir
tybug f9441a1
reword todo comment
tybug b41d425
revert accidental changes
tybug e66c88d
revert float changes
tybug 6e2f394
let's just revert a bunch of stuff, shall we?
tybug dd6d377
formatting
tybug 3ce8fdb
Merge branch 'more-test-changes' into datatree-ir
tybug 245475f
nocover error case in datatree ir handling
tybug 433ac7a
add observer param to fresh_data
tybug 2defb40
add tests for observing and non-observing draws
tybug 90e9600
rename test
tybug e7475a3
rewrite compute_max_children string case to be more correct
tybug 42f2d17
add morecover tests for IntList
tybug a2dcfd9
avoid forcefully splitting on forced nodes
tybug 4909988
Merge branch 'master' into datatree-ir
tybug e49c829
update test_targeting_can_drive_length_very_high with draw_boolean
tybug 6d60e79
give up on novel prefixes when they are too hard to discover
tybug e26e5d1
kneecap inquisitor test (unfortunately)
tybug 11c5681
give up completely on novel generation instead of returning non-novel
tybug 4ab69f2
increase attempts budget
tybug 9829729
kneecap test_discards_kill_branches for now
tybug df121e7
weaken test_one_dead_branch
tybug 0f24890
fix compute_max_children for certain boolean draws
tybug 38b0747
weaken test_lot_of_dead_nodes
tybug 95d4f71
type observe params
tybug ab47af7
fix float keys being interpreted incorrectly in simulate_test_function
tybug c4de1c9
formatting
tybug 931508d
add TooHard cover test
tybug 6d5b1a9
nocover TooHard in generate_new_examples
tybug 6469428
add types to ir kwargs/values
tybug bff153f
formatting
tybug cf786db
type datatree more
tybug 9245460
some linting adjustments
tybug 3cf8d3e
fix test_can_observe_draws
tybug 4386a9a
fix lint rule
tybug cfb4439
add test for jsonable large ints
tybug 459e96f
deflake test_finds_multiple_failures_in_generation
tybug 7e422a0
deflake test_shrinks_both_failures
tybug 9f1f0bf
add release notes
tybug d5a0edc
reword
tybug 5832b5f
rewrite comment
tybug 55e6c76
lint
tybug c15a19e
more consistent test_novel_prefix_gives_up_when_too_hard
tybug 4deffdd
switch order of kwargs and ir_type in compute_max_children
tybug 9040090
compute and draw from a set of available children instead of giving u…
tybug 77680cb
fix ordering in floats_between
tybug c9eaf6c
add more ir tests
tybug bce60d5
no-branch on _draw_from_cache
tybug 797d67c
account for 0 weight integers in children computation
tybug c8c326a
split asserts
tybug 85316f4
format
tybug 575b53b
deflake test_subtraction_of_intervals
tybug 5058f50
fix float key representation in _draw_from_cache
tybug d9b0e0f
add cover test for hard floats
tybug 3ff7e49
deflake test_can_generate_hard_floats
tybug a1eb9a9
more consistent conjecture float coverage
tybug db565f3
simpler Literal
tybug 081e32e
wording
tybug 285bbf9
more idiomatic unhandled ir_type error
tybug 2c16f46
Merge branch 'master' into datatree-ir
Zac-HD 4d4a32f
formatting
Zac-HD File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
RELEASE_TYPE: patch | ||
|
||
This release improves our distribution of generated values for all strategies, by doing a better job of tracking which values we have generated before and avoiding generating them again. | ||
|
||
For example, ``st.lists(st.integers())`` previously generated ~5 each of ``[]`` ``[0]`` in 100 examples. In this release, each of ``[]`` and ``[0]`` are generated ~1-2 times each. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I love these explanatory comments 🤩
I'm also trying to think of a way to get rid of sub-ir draws as soon as possible. They're annoying to think about, we want to get rid of them soon anyway, and it's making managing the refactoring process harder. However I really don't see a way to do it without having the shrinker able to operate on the IR, so... I think this is the best we can do for now.
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.
yes, they're unfortunate 😕. Agreed we kinda have to live with them for now. Dealing with the gotchas here has definitely bumped up "migrate the shrinker off the bitstream asap" on my task list.