From 9165c9ef43496f95f1ec635c58ac1187c03a58ab Mon Sep 17 00:00:00 2001 From: Scott Stevenson Date: Mon, 6 Jan 2025 18:14:19 +0000 Subject: [PATCH] Set `epoch_seed_change` attribute on `SimulationDataset` (#840) Co-authored-by: Saaketh Narayan --- simulation/core/sim_dataset.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/simulation/core/sim_dataset.py b/simulation/core/sim_dataset.py index fe1036ea3..f093106df 100644 --- a/simulation/core/sim_dataset.py +++ b/simulation/core/sim_dataset.py @@ -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 = {