Skip to content

Commit

Permalink
Cleanup train cli logs (#1037)
Browse files Browse the repository at this point in the history
  • Loading branch information
tancik authored Nov 28, 2022
1 parent f739786 commit fff1fee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions nerfstudio/engine/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ def _check_viewer_warnings(self) -> None:
"""Helper to print out any warnings regarding the way the viewer/loggers are enabled"""
if self.config.is_viewer_enabled():
string = (
"[WARNING] Not running eval iterations since only viewer is enabled."
" Use `--vis wandb` or `--vis tensorboard` to run with eval instead."
"[NOTE] Not running eval iterations since only viewer is enabled."
" 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
def _init_viewer_state(self) -> None:
Expand Down
8 changes: 3 additions & 5 deletions nerfstudio/utils/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ def setup_event_writer(config: cfg.Config, log_dir: Path) -> None:
if using_event_writer:
string = f"logging events to: {log_dir}"
else:
string = "disabled tensorboard/wandb event writers"
CONSOLE.print(f"[bold red]{string}")
string = "Disabled tensorboard/wandb event writers"
CONSOLE.print(f"[bold yellow]{string}")


class Writer:
Expand Down Expand Up @@ -387,7 +387,7 @@ def write_stats_log(self, step: int) -> None:
if not self.has_printed and self.config.max_log_size:
CONSOLE.log(
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."
)
latest_map, new_key = self._consolidate_events()
Expand Down Expand Up @@ -430,10 +430,8 @@ def _update_header(self, latest_map, new_key):
self.past_mssgs[0] = mssg
self.past_mssgs[1] = "-" * len(mssg)
if full_log_cond or not self.has_printed:
print("testeing testing!")
print(mssg)
print("-" * len(mssg))
# self.has_printed = True

def _print_stats(self, latest_map, padding=" "):
"""helper to print out the stats in a readable format
Expand Down

0 comments on commit fff1fee

Please sign in to comment.