mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
Remove clutter for logging in terminal (#40)
* added skeleton for terminal logger * done skeleton terminal writer logic... todo: actual calls to the write classes * moved lambda to top function * added logic to support timing * prettier printing * prettier printing * lint * separated out timing and other stats variables. printing in dict format * keeping logging history and wiping rest * updated logic to calculate total times instead of average times
This commit is contained in:
1 parent
5d4ffa210a
commit
23b70634cb
3 files changed
+160
-51
No files matched your search
@@ -12,3 +12,17 @@ def check_main_thread(func: Callable) -> Callable:
|
||||
func(self, *args, **kwargs)
|
||||
|
||||
return wrapper
|
||||
|
||||
|
||||
def check_print_stats_step(func: Callable) -> Callable:
|
||||
"""Declarator: check if it is time to print stats update"""
|
||||
|
||||
def wrapper(self, *args, **kwargs):
|
||||
if (
|
||||
self.step % self.config.steps_per_log == 0
|
||||
or (self.config.steps_per_save and self.step % self.config.steps_per_save == 0)
|
||||
or self.step % self.config.steps_per_test == 0
|
||||
):
|
||||
func(self, *args, **kwargs)
|
||||
|
||||
return wrapper
|
||||
Reference in new issue
Block a user