Skip to content

Commit

Permalink
remove optional comment in docstring for step (#482)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #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
  • Loading branch information
JKSenthil authored and facebook-github-bot committed Jul 31, 2023
1 parent 5089723 commit 4ab318c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchtnt/utils/loggers/tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 4ab318c

Please sign in to comment.