Skip to content

Conversation

@JamesHollyer
Copy link
Contributor

  • Motivation for features / changes
    This change adds the "Smoothed" column to the data table which we expect users to want. It also helps align the data table more closely with the tooltip.

  • Technical description of changes
    Since this column is more dynamic and should only appear when smoothing is enabled I moved the dataHeaders construction to the container where I made it dependent on the smoothingEnabled$ Observable.

  • Screenshots of UI changes

Screen Shot 2022-08-03 at 3 27 56 PM


expect(scalarCardComponent.componentInstance.dataHeaders).toContain(
ColumnHeaders.SMOOTHED
);
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 also add tests for the value (0.1)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added test to ensure we use the y value.

});
}));

it('adds smoothed column header when smoothed is enabled', fakeAsync(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this moved into "getTimeSelectionTableData" section?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. Moved.

Copy link
Contributor Author

@JamesHollyer JamesHollyer left a comment

Choose a reason for hiding this comment

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

Thanks Jie-Wei. Let me know if you see anything else you want to add/change.

});
}));

it('adds smoothed column header when smoothed is enabled', fakeAsync(() => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. Moved.


expect(scalarCardComponent.componentInstance.dataHeaders).toContain(
ColumnHeaders.SMOOTHED
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added test to ensure we use the y value.

expect(
scalarCardComponent.componentInstance.getTimeSelectionTableData()[0]
.SMOOTHED
).toBe(scalarCardComponent.componentInstance.dataSeries[1].points[1].y);
Copy link
Contributor

Choose a reason for hiding this comment

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

To make it clear and simpler in testing, I think it's a good practice to make the input be a simple number or string instead of variable. (constant variable is fine)
Could you replace the variable here with a number (or string)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea it was just a weird number so I thought this might make more sense. I am cool using it though. Changed.

Copy link
Contributor

Choose a reason for hiding this comment

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

If the number is not intuitive, please add comment above to explain. I guess this is caused by values of 1, 20, 30. Yet I cannot recall how is the smooth calculated.

@JamesHollyer JamesHollyer merged commit 985e3ab into tensorflow:master Aug 4, 2022
yatbear pushed a commit that referenced this pull request Aug 5, 2022
Motivation for features / changes
This change adds the "Smoothed" column to the data table which we expect users to want. It also helps align the data table more closely with the tooltip.

Technical description of changes
Since this column is more dynamic and should only appear when smoothing is enabled I moved the dataHeaders construction to the container where I made it dependent on the smoothingEnabled$ Observable.
yatbear pushed a commit to yatbear/tensorboard that referenced this pull request Mar 27, 2023
…flow#5839)

Motivation for features / changes
This change adds the "Smoothed" column to the data table which we expect users to want. It also helps align the data table more closely with the tooltip.

Technical description of changes
Since this column is more dynamic and should only appear when smoothing is enabled I moved the dataHeaders construction to the container where I made it dependent on the smoothingEnabled$ Observable.
dna2github pushed a commit to dna2fork/tensorboard that referenced this pull request May 1, 2023
…flow#5839)

Motivation for features / changes
This change adds the "Smoothed" column to the data table which we expect users to want. It also helps align the data table more closely with the tooltip.

Technical description of changes
Since this column is more dynamic and should only appear when smoothing is enabled I moved the dataHeaders construction to the container where I made it dependent on the smoothingEnabled$ Observable.
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.

2 participants