Skip to content

Commit

Permalink
Fix for instructlab#254
Browse files Browse the repository at this point in the history
Signed-off-by: ashna000 <[email protected]>
  • Loading branch information
ashna000 authored Oct 15, 2024
1 parent 68b4b76 commit c84359e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/instructlab/training/multipack_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get_effective_samples_per_minibatch(num_tokens_per_gpu):
padding=True,
)
batches = sampler.generate_batches()
return len(dataset) / len(batches)
return len(dataset) / len(batches if len(batches) > 0 else None

samples_per_gpu = samples_per_minibatch / num_gpus

Expand Down

0 comments on commit c84359e

Please sign in to comment.