From 945710fcbb846f38f81094137ed2ed90718cd899 Mon Sep 17 00:00:00 2001 From: Yating Date: Tue, 17 Oct 2023 18:14:43 -0400 Subject: [PATCH] Hparams: Update docstrings (#6633) Googlers, see b/292102513 for context. #hparams --- tensorboard/data/provider.py | 3 ++- tensorboard/plugins/hparams/backend_context.py | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tensorboard/data/provider.py b/tensorboard/data/provider.py index 5df3c944f2..520cc87ae3 100644 --- a/tensorboard/data/provider.py +++ b/tensorboard/data/provider.py @@ -227,7 +227,8 @@ def read_scalars( plugin_name: String name of the TensorBoard plugin that created the data to be queried. Required. downsample: Integer number of steps to which to downsample the - results (e.g., `1000`). See `DataProvider` class docstring + results (e.g., `1000`). The most recent datum (last scalar) + should always be included. See `DataProvider` class docstring for details about this parameter. Required. run_tag_filter: Optional `RunTagFilter` value. If provided, a time series will only be included in the result if its run and tag diff --git a/tensorboard/plugins/hparams/backend_context.py b/tensorboard/plugins/hparams/backend_context.py index 5d8bd7cebb..e15b5773f6 100644 --- a/tensorboard/plugins/hparams/backend_context.py +++ b/tensorboard/plugins/hparams/backend_context.py @@ -190,9 +190,8 @@ def read_last_scalars(self, ctx, experiment_id, run_tag_filter): experiment_id=experiment_id, plugin_name=scalar_metadata.PLUGIN_NAME, run_tag_filter=run_tag_filter, - # TODO(#3436): We assume that downsampling always includes - # the most recent datum, which holds for all implementations - # of interest but is not yet required by the interface. + # `read_scalars` always includes the most recent datum, therefore + # downsampling to one means fetching the latest value. downsample=1, ) return {