4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 10:34:29 +08:00

Cleanup train cli logs (#1037)

This commit is contained in:
Matthew Tancik 2022-11-27 21:51:43 -08:00 committed by GitHub
parent f739786d3a
commit fff1fee686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -198,10 +198,10 @@ class Trainer:
"""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:

View File

@ -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:
@ -387,7 +387,7 @@ class LocalWriter:
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()
@ -430,10 +430,8 @@ class LocalWriter:
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