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

Implement --powerset-skip-first and --powerset-num-tests #1

Open
wants to merge 1 commit into
base: randomize_powerset
Choose a base branch
from

Conversation

vi
Copy link
Owner

@vi vi commented Jan 25, 2025

No description provided.

@taiki-e
Copy link

taiki-e commented Jan 26, 2025

Thanks. I think adding support for the --randomize-poerset option to the --partition option (taiki-e#253) would be easier to use than adding these individual flags.

@vi
Copy link
Owner Author

vi commented Jan 26, 2025

Thanks. I think adding support for the --randomize-poerset option to the --partition option (taiki-e#253) would be easier to use than adding these individual flags.

Do you mean rebasing the --randomize-powerset pull requests against the (already merged) --partition merge request?

Or implementing --powerset-num-tests similarly to --partition implementation (i.e. not specific to powersets)?


Main use case of --randomize-powerset is to non-exhaustively test crates with a lot of features, where powerset can be considered effectively infinite. Partitioning can be cumbersome there, as each new feature would still double the number of tests.


P.S. I didn't know about partitioning is already supported.

@taiki-e
Copy link

taiki-e commented Jan 28, 2025

Do you mean rebasing the --randomize-powerset pull requests against the (already merged) --partition merge request?

Or implementing --powerset-num-tests similarly to --partition implementation (i.e. not specific to powersets)?

I thought it might be possible to reuse the (API) design of existing partitioning feature and it would be more user-friendly than adding a new feature with a completely new design for a similar purpose.

Main use case of --randomize-powerset is to non-exhaustively test crates with a lot of features, where powerset can be considered effectively infinite. Partitioning can be cumbersome there, as each new feature would still double the number of tests.

Hmm, if there are too many combinations of features to make an exhaustive check, then I think the taiki-e#255 's approach would be more efficient. (An approach that calculates powerset in advance can result in OOM.)

@vi
Copy link
Owner Author

vi commented Jan 29, 2025

Why is taiki-e#255 unmerged?

(If I looked in unmerged pull requests prior to implementing, neither this nor taiki-e#266 would have been needed)

The only thing taiki-e#255 + taiki-e#266 does not cover is both parallel and randomized runs (without unnecessary repetition).

@taiki-e
Copy link

taiki-e commented Jan 29, 2025

Why is taiki-e#255 unmerged?

There are some TODOs and I don't have the bandwidth to complete them.

From the description of taiki-e#255:

There are a few things missing as I have just roughly implemented the idea:

// TODO: 
// - If duplicates are found, they should be de-duplicated and regenerated. 
//   - Same for filtered case. 
// - If the total number of possible combinations is less than num_samples, 
//   then we should use normal powerset(). 

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.

2 participants