Skip to content

Commit

Permalink
Set epoch_seed_change attribute on SimulationDataset (#840)
Browse files Browse the repository at this point in the history
Co-authored-by: Saaketh Narayan <saaketh.narayan@databricks.com>
  • Loading branch information
srstevenson and Saaketh Narayan authored Jan 6, 2025
1 parent 35ab27f commit 9165c9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions simulation/core/sim_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ def __init__(self,
if epoch_size_value < 0:
raise ValueError(f'Epoch size cannot be negative. Received {epoch_size_value}.')

# Determine if we should be changing the seed every epoch
self.epoch_seed_change = self.shuffle and self.sampling_method == 'balanced'

# Initialize the Stream defaults and normalize to a list of Streams.
if streams:
default = {
Expand Down

0 comments on commit 9165c9e

Please sign in to comment.