Enforce that global batch size is not larger than the available dataset#55
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Default config is 5 categories * 144 instances = 720 pairs
3 (category, instance) pairs -> 2 * n_fracts_per_vol / 2
720 / 3 = 240 total volumes/examples
180 training samples from 75/25 split
global batch size = batch_size * (world_size / prod(dc_num_shards))
So in order to ensure the same optimizer step doesn't process duplicate samples, we want global_batch_size <= training samples.
We could create a larger version of
ScaFFold/datagen/ifs_weight/weights_ins145.csv, but adding more instances dilutes the samples, because all are variations of a single instanceThis isn't an issue in practice, because while at larger scales we need bigger
world_sizewe also need more sharding, which keeps global batch size relatively low. I'm adding this check to ensure training quality is not influenced by duplicate samples.