mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-10 18:17:31 +08:00
1.6 KiB
1.6 KiB
Local writer
The LocalWriter simply outputs numerical stats to the terminal.
You can specify additional parameters to customize your logging experience.
A skeleton of the local writer config is defined below.
"""nerfstudio/configs/base_config.py""""
@dataclass
class LocalWriterConfig(InstantiateConfig[writer.LocalWriter]):
"""Local Writer config"""
enable: bool = False
stats_to_track: Tuple[writer.EventName, ...] = (
writer.EventName.ITER_TRAIN_TIME,
...
)
max_log_size: int = 10
You can customize the local writer by editing the attributes:
enable: enable/disable the logger.stats_to_track: all the stats that you want to print to the terminal (see list underEventNameinutils/writer.py). You can add or remove any of the defined enums.max_log_size: how much content to print onto the screen (By default, only print 10 lines onto the screen at a time). If 0, will print everything without deleting any previous lines.
:::{admonition} Tip :class: info
If you want to create a new stat to track, simply add the stat name to the EventName enum.
- Remember to call some put event (e.g.
put_scalarfromutils/writer.pyto place the value in theEVENT_STORAGE. - Remember to add the new enum to the
stats_to_tracklist :::
The local writer is easily configurable via CLI. A few common commands to use:
-
Disable local writer
ns-train {METHOD_NAME} --logging.local-writer.no-enable -
Disable line wrapping
ns-train {METHOD_NAME} --logging.local-writer.max-log-size=0