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: Limit number of Hparams retrieved by default. #6777

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

bmd3k
Copy link
Contributor

@bmd3k bmd3k commented Mar 6, 2024

Limit the number of hparams retrieved by default to 1000 for display in Time Series. Print retrieval information: # of columns loaded and whether there could be more.

This is to address performance issues with loading 1000s of hparams from the backend and trying to render them all.

In a future PR we will add abitlity to "Load All" if user wants to nonetheless load them all.

Screenshot (with default set to 2 instead of 1000):
image

@bmd3k bmd3k requested a review from rileyajones March 6, 2024 18:16
@@ -35,6 +35,8 @@ import {BehaviorSubject} from 'rxjs';
})
export class ColumnSelectorComponent implements OnInit, AfterViewInit {
@Input() selectableColumns: ColumnHeader[] = [];
@Input() numColumnsLoaded!: number;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this prop? Can't you just use selectableColumns.length?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SelectableColumns does not include all columns (for example, the ones that have already been selected).

@@ -101,10 +102,12 @@ export interface BackendHparamsExperimentResponse {

interface HparamsColFilterParams {
hparam: string;
includeInResult: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what this is doing? What is a result? Why would something not be included?

I'm kinda assuming this is a flag returned by the server which indicates that an hparam was included in the response, but that seems kinda redundant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

api.proto probably has the best documentation for this:

optional bool include_in_result = 9;

I'm following the pattern of the rest of the file of not repeating the documentation here.

The api.proto documentation is not perfect, however. Left unsaid is that if you don't set includeInResult field on any of the fields in the request then the backend assumes you want all fields, even if they are not specified as a col param. I believe this is for backward compatibility.

In the case where none of the col_params contains the field, we should assume

So we have to set includeInResult or the backend would return hparam values for all hparams and not just the 1000 we retrieved in the /experiment request.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the link, I think I understand now.

@bmd3k bmd3k requested a review from rileyajones March 7, 2024 13:19
@@ -20,6 +20,8 @@
[sortingInfo]="sortingInfo"
[columnFilters]="columnFilters"
[selectableColumns]="selectableColumns"
[numColumnsLoaded]="numColumnsLoaded"
[hasMoreColumnsToLoad]="numColumnsLoaded == numColumnsToLoad"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[hasMoreColumnsToLoad]="numColumnsLoaded == numColumnsToLoad"
[hasMoreColumnsToLoad]="numColumnsLoaded === numColumnsToLoad"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -101,10 +102,12 @@ export interface BackendHparamsExperimentResponse {

interface HparamsColFilterParams {
hparam: string;
includeInResult: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the link, I think I understand now.

@bmd3k bmd3k merged commit a0bddaf into tensorflow:master Mar 7, 2024
13 checks passed
bmd3k added a commit that referenced this pull request Mar 11, 2024
AnuarTB pushed a commit to AnuarTB/tensorboard that referenced this pull request May 3, 2024
Limit the number of hparams retrieved by default to 1000 for display in
Time Series. Print retrieval information: # of columns loaded and
whether there could be more.

This is to address performance issues with loading 1000s of hparams from
the backend and trying to render them all.

In a future PR we will add ability to "Load All" if user wants to
nonetheless load them all.

Screenshot (with default set to 2 instead of 1000):

![image](https://github.com/tensorflow/tensorboard/assets/17152369/b0f2c4e6-bda0-4ed7-bead-9f1ef6eaaca7)
AnuarTB pushed a commit to AnuarTB/tensorboard that referenced this pull request May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants