|
| 1 | +import abc |
| 2 | +from _typeshed import Incomplete |
| 3 | +from collections.abc import Callable, Iterator |
| 4 | +from contextlib import AbstractContextManager, contextmanager |
| 5 | +from typing import Literal |
| 6 | +from typing_extensions import Self |
| 7 | + |
| 8 | +import tensorflow as tf |
| 9 | +from tensorflow._aliases import FloatArray, IntArray |
| 10 | +from tensorflow.experimental.dtensor import Mesh |
| 11 | + |
| 12 | +class SummaryWriter(metaclass=abc.ABCMeta): |
| 13 | + def as_default(self, step: int | None = None) -> AbstractContextManager[Self]: ... |
| 14 | + def close(self) -> None: ... |
| 15 | + def flush(self) -> None: ... |
| 16 | + def init(self) -> None: ... |
| 17 | + def set_as_default(self, step: int | None = None) -> None: ... |
| 18 | + |
| 19 | +def audio( |
| 20 | + name: str, |
| 21 | + data: tf.Tensor, |
| 22 | + sample_rate: int | tf.Tensor, |
| 23 | + step: int | tf.Tensor | None = None, |
| 24 | + max_outputs: int | tf.Tensor | None = 3, |
| 25 | + encoding: Literal["wav"] | None = None, |
| 26 | + description: str | None = None, |
| 27 | +) -> bool: ... |
| 28 | +def create_file_writer( |
| 29 | + logdir: str, |
| 30 | + max_queue: int | None = None, |
| 31 | + flush_millis: int | None = None, |
| 32 | + filename_suffix: str | None = None, |
| 33 | + name: str | None = None, |
| 34 | + experimental_trackable: bool = False, |
| 35 | + experimental_mesh: Mesh | None = None, |
| 36 | +) -> SummaryWriter: ... |
| 37 | +def create_noop_writer() -> SummaryWriter: ... |
| 38 | +def flush(writer: SummaryWriter | None = None, name: str | None = None) -> tf.Operation: ... |
| 39 | +def graph(graph_data: tf.Graph | tf.compat.v1.GraphDef) -> bool: ... |
| 40 | +def histogram( |
| 41 | + name: str, data: tf.Tensor, step: int | None = None, buckets: int | None = None, description: str | None = None |
| 42 | +) -> bool: ... |
| 43 | +def image( |
| 44 | + name: str, |
| 45 | + data: tf.Tensor | FloatArray | IntArray, |
| 46 | + step: int | tf.Tensor | None = None, |
| 47 | + max_outputs: int | None = 3, |
| 48 | + description: str | None = None, |
| 49 | +) -> bool: ... |
| 50 | +@contextmanager |
| 51 | +def record_if(condition: bool | tf.Tensor | Callable[[], bool]) -> Iterator[None]: ... |
| 52 | +def scalar(name: str, data: float | tf.Tensor, step: int | tf.Tensor | None = None, description: str | None = None) -> bool: ... |
| 53 | +def should_record_summaries() -> bool: ... |
| 54 | +def text(name: str, data: str | tf.Tensor, step: int | tf.Tensor | None = None, description: str | None = None) -> bool: ... |
| 55 | +def trace_export(name: str, step: int | tf.Tensor | None = None, profiler_outdir: str | None = None) -> None: ... |
| 56 | +def trace_off() -> None: ... |
| 57 | +def trace_on(graph: bool = True, profiler: bool = False) -> None: ... |
| 58 | +def write( |
| 59 | + tag: str, tensor: tf.Tensor, step: int | tf.Tensor | None = None, metadata: Incomplete | None = None, name: str | None = None |
| 60 | +) -> bool: ... |
0 commit comments