Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Split folds when multiple domains helper #3676

Merged
merged 3 commits into from
Jun 2, 2021
Merged

Split folds when multiple domains helper #3676

merged 3 commits into from
Jun 2, 2021

Conversation

moyapchen
Copy link
Contributor

We've got some use cases where we've got a single dataset that has different sub-components that can be swapped in + out. It's a little subtle how we make sure we're getting the same samples out of every domain (namely, we can't concatinate them all together), so make a helper function for it.

Test Plan:
Print out outputs in a dataset that use this, with a varying # of domains but one fixed domain. Verify that the same lines show up for the fixed domain.

We've got some use cases where we've got a single dataset that has different sub-components that can be swapped in + out. It's a little subtle how we make sure we're getting the same samples out of every domain (namely, we can't concatinate them all together), so make a helper function for it.

Test Plan:
Print out outputs in a dataset that use this, with a varying # of domains but one fixed domain. Verify that the same lines show up for the fixed domain.

result = []
for domain in domains:
random.Random(42).shuffle(domain)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make the seed an argument?

@stephenroller
Copy link
Contributor

(also a test plz)

@moyapchen moyapchen merged commit 4be7a23 into master Jun 2, 2021
@moyapchen moyapchen deleted the by_fold_helper branch June 2, 2021 18:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants