Skip to content

Commit

Permalink
Strip lines when log-tailing
Browse files Browse the repository at this point in the history
Differential Revision: D66191123

Pull Request resolved: #973
  • Loading branch information
Sanjay-Ganeshan authored Dec 3, 2024
1 parent a5f840e commit cb0e457
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchx/util/log_tee_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _print_log_lines_for_role_replica(
color_begin = ""
color_end = ""
prefix = f"{color_begin}{which_role}/{which_replica}{color_end} "
print(_prefix_line(prefix, line), file=dst, end="", flush=True)
print(_prefix_line(prefix, line.strip()), file=dst, end="\n", flush=True)
except Exception as e:
exceptions.put(e)
raise
Expand Down

0 comments on commit cb0e457

Please sign in to comment.