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

Randomized testing of *Cut classes invariants #119

Closed
pzelasko opened this issue Nov 8, 2020 · 0 comments · Fixed by #135
Closed

Randomized testing of *Cut classes invariants #119

pzelasko opened this issue Nov 8, 2020 · 0 comments · Fixed by #135

Comments

@pzelasko
Copy link
Collaborator

pzelasko commented Nov 8, 2020

Motivation:

MixedCut has grown into a more complex class than it seems since it can be composed of many underlying cuts that have either Cut or PaddingCut type. Recently I fixed some off-by-one num_frames errors between the meta-data and the actual feature matrices due to rounding. While things seem to be working okay now, I'd like to be sure we are free of this sort of errors, but the space of possible cut combinations is too large to cover with standard unit test cases.

Goal:

Test that MixedCut created in various ways always has consistent num_samples and num_frames metadata with the actual data shapes when samples/features are loaded into memory.

We should create the MixedCut by initializing fake Recordings + Cuts with random sampling rates and durations, extracting features for them, and then performing a number of randomly selected operations: pad, mix, and append. We can use a randomized testing library like hypothesis if it is useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant