-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hparams: Support excluding metric information in HTTP requests. #6556
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks!
@@ -37,9 +41,15 @@ def run(self): | |||
An Experiment object. | |||
""" | |||
experiment_id = self._experiment_id | |||
include_metrics = ( | |||
not self._request.HasField("include_metrics") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Could you add a comment for L45 to mention metrics are included by default (if this option is not specified), just to minimize cognitive load.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
…orflow#6556) There are some clients of the Hparams HTTP API that do not require the metric information. This includes the metric_infos usually returned in the /experiments request and the metric_values usually returned in the /session_groups request. Since these can be expensive to calculate, we want the option to not calculate and return them in the response. Add option `include_metrics` to both GetExperimentRequest and ListSessionGroupsRequest. If unspecified we treat `include_metrics` as True, for backward compatibility. Honor the `include_metrics` property in all three major cases: When experiment metadata is defined by Experiment tags, by Session tags, or by the DataProvider.
…le with hparams. (#6678) The runs table does not display any of the metric fields/data returned by the hparams plugin. We want to avoid unnecessarily calculating this data on the backend. The hparams plugin allows requests to specify an include_metrics parameter (added in #6556). We set this flag to false for all hparams-related requests coming from the "hparams_data_source". Testing: * Observed in both OSS and internal TensorBoard that setting this flag to False results in responses that do not include the metric data. * Observed that hparams in timeseries runs table still works. * Observed that hparams in experiment list runs table still works.
There are some clients of the Hparams HTTP API that do not require the metric information. This includes the metric_infos usually returned in the /experiments request and the metric_values usually returned in the /session_groups request. Since these can be expensive to calculate, we want the option to not calculate and return them in the response.
Add option
include_metrics
to both GetExperimentRequest and ListSessionGroupsRequest. If unspecified we treatinclude_metrics
as True, for backward compatibility. Honor theinclude_metrics
property in all three major cases: When experiment metadata is defined by Experiment tags, by Session tags, or by the DataProvider.