refactor: Use self.dataset.seed directly for chunk seed generation

This commit is contained in:
Andreas Koepf (aider) 2025-01-30 22:02:21 +01:00
parent df153d0dde
commit 42f6a742c9

View file

@ -93,9 +93,8 @@ class ReseedingDataset(Iterable[Dict[str, Any]]):
# Create new config with modified seed
new_config = deepcopy(self.dataset.config)
if hasattr(new_config, "seed"):
# Derive new seed from chunk number
base_seed = new_config.seed if new_config.seed is not None else 0
new_config.seed = base_seed + chunk_num
# Derive new seed from chunk number using dataset's seed
new_config.seed = self.dataset.seed + chunk_num
# Create new dataset instance with chunk config
return self.dataset_cls(new_config)