From 4ab318c7cce745ca54ba33435b92c849904ffb21 Mon Sep 17 00:00:00 2001 From: Jason Senthil Date: Mon, 31 Jul 2023 16:33:01 -0700 Subject: [PATCH] remove optional comment in docstring for step (#482) Summary: Pull Request resolved: https://github.com/pytorch/tnt/pull/482 received this error: ``` [0]: > self.tb_logger.log("avg_test_auc", self.total_auc_sum / self.num_eval_steps) [0]:TypeError: TensorBoardLogger.log() missing 1 required positional argument: 'step' ``` Docstring says it is optional, but it is typed to be enforced. Removing `optional` from docstring Reviewed By: ananthsub Differential Revision: D47921178 fbshipit-source-id: a1c650d34ef23271daf34153825d62341c3be16f --- torchtnt/utils/loggers/tensorboard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torchtnt/utils/loggers/tensorboard.py b/torchtnt/utils/loggers/tensorboard.py index 7f6b00fb7f..e748097152 100644 --- a/torchtnt/utils/loggers/tensorboard.py +++ b/torchtnt/utils/loggers/tensorboard.py @@ -93,7 +93,7 @@ def log_dict(self, payload: Mapping[str, Scalar], step: int) -> None: Args: payload (dict): dictionary of tag name and scalar value - step (int, Optional): step value to record + step (int): step value to record """ if self._writer: @@ -106,7 +106,7 @@ def log(self, name: str, data: Scalar, step: int) -> None: Args: name (string): tag name used to group scalars data (float/int/Tensor): scalar data to log - step (int, optional): step value to record + step (int): step value to record """ if self._writer: