Skip to content

Commit fdc82ad

Browse files
Update superbench/benchmarks/model_benchmarks/pytorch_base.py
Co-authored-by: Copilot <[email protected]>
1 parent 4724815 commit fdc82ad

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

superbench/benchmarks/model_benchmarks/pytorch_base.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,13 @@ def set_deterministic_seed(self):
288288
logger.info('Failed to enable deterministic training in centralized preprocess')
289289

290290
def _handle_deterministic_log_options(self):
291-
"""Set generate_log if deterministic and no log options are set."""
291+
"""
292+
Automatically enable log generation when deterministic mode is active and no explicit log options are set.
293+
294+
If the benchmark is running in deterministic mode and neither 'generate_log' nor 'compare_log' options are specified,
295+
this method sets 'generate_log' to True. This ensures that a reference log is produced by default, allowing users
296+
to have a baseline for future deterministic comparisons without requiring explicit log-related arguments.
297+
"""
292298
has_gen = getattr(self._args, 'generate_log', None)
293299
has_cmp = getattr(self._args, 'compare_log', None)
294300
if not has_gen and not has_cmp:

0 commit comments

Comments
 (0)