Skip to content

Commit

Permalink
fixed print in sample_many_runs
Browse files Browse the repository at this point in the history
  • Loading branch information
lueckem committed Jul 20, 2024
1 parent 18dacf2 commit da6713b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sponet/multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def _sample_many_runs_subprocess(
next_print_iter = iter_delta
start_time = time.time()
if verbose:
print("t=0.0s: 0%.")
print("t=0:00:00 : 0%.")

for j in range(num_initial_states):
for i in range(num_runs):
Expand All @@ -185,9 +185,10 @@ def _sample_many_runs_subprocess(
estimated_time_left = timedelta(
seconds=round(estimated_duration - elapsed_time)
)
elapsed_time = timedelta(seconds=round(elapsed_time))
percentage = round(num_iter / total_num_iter * 100)
print(
f"t={elapsed_time:.1f}s: {percentage}%. (Time remaining ~{estimated_time_left})"
f"t={elapsed_time} : {percentage}%. (Time remaining ~{estimated_time_left})"
)
next_print_iter += iter_delta
return x_out
Expand Down

0 comments on commit da6713b

Please sign in to comment.