Skip to content

Commit

Permalink
Hparams: fix documentation of session and session group (#6613)
Browse files Browse the repository at this point in the history
A session may contain multiple runs instead of just one run. 

Googlers, see cl/555481552 for more details.

#hparams
yatbear authored Oct 4, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent c8dbaec commit a718ebc
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions tensorboard/data/provider.py
Original file line number Diff line number Diff line change
@@ -110,10 +110,15 @@ class DataProvider(metaclass=abc.ABCMeta):
Each run within an experiment may specify its own value for a
hyperparameter. Runs that were logically executed together with the same set
of hyperparameter values form a hyperparameter session group. When querying
for hyperparameter values for a set of experiments, the result will group
runs by hyperparameter session group and provide one set of hyperparameter
values for each group.
of hyperparameter values form a hyperparameter `session`. Sessions that
include the same hyperparameter values can be grouped together in a
hyperparameter `session group`. Often a session group will contain only a
single session. However, in some scenarios, the same hyperparameters will be
used to execute multiple jobs with the idea to aggregate the metrics across
those jobs and analyze non-deterministic factors. In that case, a session
group will contain multiple sessions. The result will group runs by
hyperparameter session group and provide one set of hyperparameter values
for each group.
All methods on this class take a `RequestContext` parameter as the
first positional argument. This argument is temporarily optional to
@@ -652,15 +657,17 @@ class HyperparameterSessionRun:

@dataclasses.dataclass(frozen=True)
class HyperparameterSessionGroup:
"""A group of runs logically executed together with the same hparam values.
"""A group of sessions logically executed together with the same hparam values.
The group of runs may have, for example, combined to generate and test a
single model or other artifacts.
A `session` generally represents a particular execution of a job with a given
set of hyperparameter values. A session may contain multiple related runs
executed together to train and/or validate a model.
We assume these groups of runs were executed with the same set of
hyperparameter values. However, having the same set of hyperparameter values
is not sufficient to be considered part of the same group -- different
groups can exist with the same hyperparameter values.
Often a `session group` will contain only a single session. However, in some
scenarios, the same hyperparameters will be used to execute multiple jobs
with the idea to aggregate the metrics across those jobs and analyze
non-deterministic factors. In that case, a session group will contain multiple
sessions.
Attributes:
root: A descriptor of the common ancestor of all sessions in this

0 comments on commit a718ebc

Please sign in to comment.