Skip to content

Commit

Permalink
Fix: flush stdout in print_table
Browse files Browse the repository at this point in the history
This fixes the output of print_table during the optimization so that it
works in Jupyter notebooks or when piping output to a file (e.g., on a
cluster) by flushing stdout after each iteration.

Without this, nothing was being printed while the optimization was still
running.
  • Loading branch information
goerz committed Apr 6, 2022
1 parent f445a92 commit b5d3068
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,5 @@ function print_table(wrk, iteration, args...)
print(lpad(str, w))
end
print("\n")
flush(stdout)
end

0 comments on commit b5d3068

Please sign in to comment.