Skip to content
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: Avoid retrieving metrics when populating timeseries runs table with hparams. #6678

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion tensorboard/webapp/hparams/_redux/hparams_data_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
Domain,
DomainType,
BackendListSessionGroupRequest,
BackendHparamsExperimentRequest,
BackendHparamsExperimentResponse,
BackendHparamSpec,
DiscreteDomainHparamSpec,
Expand Down Expand Up @@ -90,12 +91,20 @@ export class HparamsDataSource {
experimentIds: string[]
): Observable<HparamAndMetricSpec> {
const formattedExperimentIds = this.formatExperimentIds(experimentIds);

const experimentRequest: BackendHparamsExperimentRequest = {
experimentName: formattedExperimentIds,
// The hparams feature generates its own metric data and does not require
// the backend to calculate it.
includeMetrics: false,
};

return this.http
.post<BackendHparamsExperimentResponse>(
`/${this.getPrefix(
experimentIds
)}/${formattedExperimentIds}/${HPARAMS_HTTP_PATH_PREFIX}/experiment`,
{experimentName: formattedExperimentIds},
experimentRequest,
{},
'request'
)
Expand Down Expand Up @@ -151,6 +160,9 @@ export class HparamsDataSource {
startIndex: 0,
// arbitrary large number so it does not get clipped.
sliceSize: 1e6,
// The hparams feature generates its own metric data and does not require
// the backend to calculate it.
includeMetrics: false,
};

return this.http
Expand Down
1 change: 1 addition & 0 deletions tensorboard/webapp/hparams/_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export {
HparamSpec as BackendHparamSpec,
DiscreteDomainHparamSpec,
IntervalDomainHparamSpec,
BackendHparamsExperimentRequest,
BackendHparamsExperimentResponse,
BackendListSessionGroupResponse,
BackendListSessionGroupRequest,
Expand Down
6 changes: 6 additions & 0 deletions tensorboard/webapp/runs/data_source/runs_backend_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ export function isDiscreteDomainHparamSpec(
return spec.hasOwnProperty('domainDiscrete');
}

export interface BackendHparamsExperimentRequest {
experimentName: string;
includeMetrics?: boolean;
}

export interface BackendHparamsExperimentResponse {
description: string;
hparamInfos: HparamSpec[];
Expand All @@ -108,6 +113,7 @@ export interface BackendListSessionGroupRequest {
colParams: Array<HparamsColFilterParams | MetricsColFilterParams>;
startIndex: number;
sliceSize: number;
includeMetrics?: boolean;
}

export interface Session {
Expand Down