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

Should batch consistency be tested with a batch of non-identical items? #1294

Closed
jcaw opened this issue Feb 22, 2021 · 2 comments · Fixed by #1315
Closed

Should batch consistency be tested with a batch of non-identical items? #1294

jcaw opened this issue Feb 22, 2021 · 2 comments · Fixed by #1315

Comments

@jcaw
Copy link
Contributor

jcaw commented Feb 22, 2021

The batch_consistency_test.py files check that behaviour is consistent on batches vs. items, but the current infrastructure does this with batches of identical items. This approach may miss bugs related to data leakage between items within a batch, for example #994. I suggest items should be different to ensure those kinds of issues are flagged.

I have an alternate implementation here which uses batches with different items (where possible). Would you like me to open a PR?

(I've just implemented it for the functional tests for now, but I can also expand it to the root batch_consistency_check.py too.)

@jcaw jcaw changed the title Batch consistency should not be tested with a batch of identical items Should batch consistency be tested with a batch of non-identical items? Feb 22, 2021
@mthrok
Copy link
Collaborator

mthrok commented Feb 22, 2021

Hi @jcaw

Thanks for the suggestion. I although thought a similar thing when reviewing #994. I briefly looked at your code and basically, your approach is to pass a batch to the helper method and run it separately and individually, correct? This looks like a good improvement. Please open a PR.

@jcaw
Copy link
Contributor Author

jcaw commented Feb 23, 2021

Awesome. Yes, that's correct. I'll open a PR.

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 a pull request may close this issue.

2 participants