Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions monai/handlers/tensorboard_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def __init__(
self,
summary_writer: SummaryWriter | SummaryWriterX | None = None,
log_dir: str = "./runs",
iteration_log: bool | Callable[[Engine, int], bool] = True,
epoch_log: bool | Callable[[Engine, int], bool] = True,
iteration_log: bool | Callable[[Engine, int], bool] | int = True,
epoch_log: bool | Callable[[Engine, int], bool] | int = True,
epoch_event_writer: Callable[[Engine, Any], Any] | None = None,
epoch_interval: int = 1,
iteration_event_writer: Callable[[Engine, Any], Any] | None = None,
Expand All @@ -110,11 +110,13 @@ def __init__(
default to create a new TensorBoard writer.
log_dir: if using default SummaryWriter, write logs to this directory, default is `./runs`.
iteration_log: whether to write data to TensorBoard when iteration completed, default to `True`.
``iteration_log`` can be also a function and it will be interpreted as an event filter
``iteration_log`` can be also a function or int. If it is an int, it will be interpreted as the iteration interval
at which the iteration_event_writer is called. If it is a function, it will be interpreted as an event filter
(see https://pytorch.org/ignite/generated/ignite.engine.events.Events.html for details).
Event filter function accepts as input engine and event value (iteration) and should return True/False.
epoch_log: whether to write data to TensorBoard when epoch completed, default to `True`.
``epoch_log`` can be also a function and it will be interpreted as an event filter.
``epoch_log`` can be also a function or int. If it is an int, it will be interpreted as the epoch interval
at which the epoch_event_writer is called. If it is a function, it will be interpreted as an event filter.
See ``iteration_log`` argument for more details.
epoch_event_writer: customized callable TensorBoard writer for epoch level.
Must accept parameter "engine" and "summary_writer", use default event writer if None.
Expand Down