Cleanup train cli logs (#1037)

This commit is contained in:
Matthew Tancik authored and GitHub committed 2022-11-27 21:51:43 -08:00
1 parent f739786d3a
commit fff1fee686
2 files changed
+6 -8

No files matched your search

+3 -3
View File
@@ -198,10 +198,10 @@ class Trainer:
"""Helper to print out any warnings regarding the way the viewer/loggers are enabled""" """Helper to print out any warnings regarding the way the viewer/loggers are enabled"""
if self.config.is_viewer_enabled(): if self.config.is_viewer_enabled():
string = ( string = (
"[WARNING] Not running eval iterations since only viewer is enabled." "[NOTE] Not running eval iterations since only viewer is enabled."
" Use `--vis wandb` or `--vis tensorboard` to run with eval instead." " Use [yellow]--vis wandb[/yellow] or [yellow]--vis tensorboard[/yellow] to run with eval instead."
) )
CONSOLE.print(f"[bold red]{string}") CONSOLE.print(f"{string}")
@check_viewer_enabled @check_viewer_enabled
def _init_viewer_state(self) -> None: def _init_viewer_state(self) -> None:
+3 -5
View File
@@ -208,8 +208,8 @@ def setup_event_writer(config: cfg.Config, log_dir: Path) -> None:
if using_event_writer: if using_event_writer:
string = f"logging events to: {log_dir}" string = f"logging events to: {log_dir}"
else: else:
string = "disabled tensorboard/wandb event writers" string = "Disabled tensorboard/wandb event writers"
CONSOLE.print(f"[bold red]{string}") CONSOLE.print(f"[bold yellow]{string}")
class Writer: class Writer:
@@ -387,7 +387,7 @@ class LocalWriter:
if not self.has_printed and self.config.max_log_size: if not self.has_printed and self.config.max_log_size:
CONSOLE.log( CONSOLE.log(
f"Printing max of {self.config.max_log_size} lines. " f"Printing max of {self.config.max_log_size} lines. "
"Set flag `--logging.local-writer.max-log-size=0` " "Set flag çççç[yellow]--logging.local-writer.max-log-size=0[/yellow] "
"to disable line wrapping." "to disable line wrapping."
) )
latest_map, new_key = self._consolidate_events() latest_map, new_key = self._consolidate_events()
@@ -430,10 +430,8 @@ class LocalWriter:
self.past_mssgs[0] = mssg self.past_mssgs[0] = mssg
self.past_mssgs[1] = "-" * len(mssg) self.past_mssgs[1] = "-" * len(mssg)
if full_log_cond or not self.has_printed: if full_log_cond or not self.has_printed:
print("testeing testing!")
print(mssg) print(mssg)
print("-" * len(mssg)) print("-" * len(mssg))
# self.has_printed = True
def _print_stats(self, latest_map, padding=" "): def _print_stats(self, latest_map, padding=" "):
"""helper to print out the stats in a readable format """helper to print out the stats in a readable format