torchoutil.extras.tensorboard module

class TensorboardEvent(
*args,
**kwargs,
)[source]

Bases: dict

dtype: str
float_val: typing_extensions.NotRequired[List[float]]
step: int
string_val: typing_extensions.NotRequired[str]
tag: str
value: str | float
wall_time: float
get_duration(
fpath: str | Path,
verbose: int = 0,
) float[source]

Return time elapsed between first and last log in a tensorboard event file.

get_tfevents_duration(
fpath: str | Path,
verbose: int = 0,
) float[source]

Return time elapsed between first and last log in a tensorboard event file.

load_event_file(
fpath: str | Path,
*,
cast_float_and_str: bool = True,
ignore_underscore_tags: bool = True,
verbose: int = 0,
) List[TensorboardEvent][source]
Args:

fpath: File path to a tensorboard event file. cast_float_and_str: Cast string to floats and store result in ‘value’ field. defaults to True. ignore_underscore_tags: Ignore event when tag starts with an underscore. defaults to True. verbose: Verbose level. Higher value means more log messages. defaults to 0.

load_event_files(
paths_or_patterns: str | Path | Iterable[str | Path],
*,
cast_float_and_str: bool = True,
ignore_underscore_tags: bool = True,
verbose: int = 0,
) Dict[str, List[TensorboardEvent]][source]
Args:

paths_or_patterns: Path or glob patterns to multiple files. cast_float_and_str: Cast string to floats and store result in ‘value’ field. defaults to True. ignore_underscore_tags: Ignore event when tag starts with an underscore. defaults to True. verbose: Verbose level. Higher value means more log messages. defaults to 0.

load_tfevents(
fpath: str | Path,
*,
cast_float_and_str: bool = True,
ignore_underscore_tags: bool = True,
verbose: int = 0,
) List[TensorboardEvent][source]
Args:

fpath: File path to a tensorboard event file. cast_float_and_str: Cast string to floats and store result in ‘value’ field. defaults to True. ignore_underscore_tags: Ignore event when tag starts with an underscore. defaults to True. verbose: Verbose level. Higher value means more log messages. defaults to 0.

load_tfevents_files(
paths_or_patterns: str | Path | Iterable[str | Path],
*,
cast_float_and_str: bool = True,
ignore_underscore_tags: bool = True,
verbose: int = 0,
) Dict[str, List[TensorboardEvent]][source]
Args:

paths_or_patterns: Path or glob patterns to multiple files. cast_float_and_str: Cast string to floats and store result in ‘value’ field. defaults to True. ignore_underscore_tags: Ignore event when tag starts with an underscore. defaults to True. verbose: Verbose level. Higher value means more log messages. defaults to 0.

load_with_tensorboard(
fpath: str | Path,
*,
cast_float_and_str: bool = True,
ignore_underscore_tags: bool = True,
verbose: int = 0,
) List[TensorboardEvent][source]
Args:

fpath: File path to a tensorboard event file. cast_float_and_str: Cast string to floats and store result in ‘value’ field. defaults to True. ignore_underscore_tags: Ignore event when tag starts with an underscore. defaults to True. verbose: Verbose level. Higher value means more log messages. defaults to 0.