Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix negative value of computation time when stdev exists #233

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dlio_benchmark/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def _eval(self, epoch):
eval_time = 0.0
if self.eval_time > 0:
if self.eval_time_stdev > 0:
eval_time = random.normal(self.eval_time, self.eval_time_stdev)
eval_time = abs(random.normal(self.eval_time, self.eval_time_stdev))
else:
eval_time = self.eval_time
self.framework.compute(batch, epoch, step, eval_time)
Expand Down Expand Up @@ -265,7 +265,7 @@ def _train(self, epoch):
if self.computation_time > 0:
self.framework.trace_object("Train", overall_step, 1)
if self.computation_time_stdev > 0:
computation_time = random.normal(self.computation_time, self.computation_time_stdev)
computation_time = abs(random.normal(self.computation_time, self.computation_time_stdev))
else:
computation_time = self.computation_time
self.framework.compute(batch, epoch, block_step, computation_time)
Expand Down
Loading