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

Adding end time and run duration to Compare Runs view #3378

Merged

Conversation

RealArpanBhattacharya
Copy link
Contributor

@RealArpanBhattacharya RealArpanBhattacharya commented Sep 2, 2020

Signed-off-by: Arpan Bhattacharya tell.arpan.bhattacharya@gmail.com

What changes are proposed in this pull request?

In the "Compare Runs" section - display end time and run duration.
Addresses this issue.

How is this patch tested?

Still trying to figure out the automated test suite.
Screenshot:
image

Release Notes

Is this a user-facing change?

It is. In the "Compare Runs" section of the tracking UI, the end timestamp, and the duration of the experiment will be shown upon pushing this patch.

What component(s), interfaces, languages, and integrations does this PR affect?

Interface

  • area/uiux: Front-end, user experience, JavaScript, plotting

How should the PR be classified in the release notes? Choose one:

  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section

Signed-off-by: Arpan Bhattacharya <tell.arpan.bhattacharya@gmail.com>
Signed-off-by: Arpan Bhattacharya <tell.arpan.bhattacharya@gmail.com>
@RealArpanBhattacharya RealArpanBhattacharya marked this pull request as ready for review September 2, 2020 13:05
@RealArpanBhattacharya RealArpanBhattacharya changed the title [Draft] Adding end time and run duration to Compare Runs view Adding end time and run duration to Compare Runs view Sep 2, 2020
@github-actions github-actions bot added the area/uiux Front-end, user experience, plotting, JavaScript, JavaScript dev server label Sep 2, 2020
@harupy
Copy link
Member

harupy commented Apr 15, 2022

@RealArpanBhattacharya Thanks for the PR and sorry for the very late reply :) Pushed a few commits to clean up the code, thanks for the contribution!

Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
@harupy harupy added the rn/feature Mention under Features in Changelogs. label Apr 15, 2022
@harupy
Copy link
Member

harupy commented Apr 15, 2022

image

I need to fix the row titles.

Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
@harupy
Copy link
Member

harupy commented Apr 15, 2022

Fixed

image

Copy link
Member

@BenWilson2 BenWilson2 left a comment

Choose a reason for hiding this comment

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

LGTM! Useful addition

Comment on lines 276 to 278
startTime: startTime ? Utils.formatTimestamp(startTime) : '(unknown)',
endTime: endTime ? Utils.formatTimestamp(endTime) : '(unknown)',
duration: startTime && endTime ? Utils.getDuration(startTime, endTime) : '(unknown)',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we translate the (unknown) string as well using formatMessage?

Comment on lines 297 to 330
<>
<tr>
<th scope='row' className='head-value sticky-header' style={colWidthStyle}>
<FormattedMessage
defaultMessage='Start Time:'
// eslint-disable-next-line max-len
description='Row title for the start time of runs on the experiment compare runs page'
/>
</th>
{runTimeAttributes.map(({ runUuid, startTime }) => [runUuid, startTime]).map(renderCell)}
</tr>
<tr>
<th scope='row' className='head-value sticky-header' style={colWidthStyle}>
<FormattedMessage
defaultMessage='End Time:'
// eslint-disable-next-line max-len
description='Row title for the end time of runs on the experiment compare runs page'
/>
</th>
{runTimeAttributes.map(({ runUuid, endTime }) => [runUuid, endTime]).map(renderCell)}
</tr>
<tr>
<th scope='row' className='head-value sticky-header' style={colWidthStyle}>
<FormattedMessage
defaultMessage='Duration:'
// eslint-disable-next-line max-len
description='Row title for the duration of runs on the experiment compare runs page'
/>
</th>
{runTimeAttributes.map(({ runUuid, duration }) => [runUuid, duration]).map(renderCell)}
</tr>
</>
);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we dry the duplicate code out?

We can create an array with all the configs and loop over the array to render each table row. What do you think?

example:

const tableCells = [
   {
       translation = <FormattedMessage
              defaultMessage='Start Time:'
              // eslint-disable-next-line max-len
              description='Row title for the start time of runs on the experiment compare runs page'
            />
   },
   {
         translation =   <FormattedMessage
              defaultMessage='End Time:'
              // eslint-disable-next-line max-len
              description='Row title for the end time of runs on the experiment compare runs page'
            />
   }
   ....
]

usage:

tableCells.map((cell) => {
<tr>
          <th scope='row' className='head-value sticky-header' style={colWidthStyle}>
            {cell.translation}
          </th>
          {runTimeAttributes.map(({ runUuid, startTime }) => [runUuid, startTime]).map(renderCell)}
        </tr>

})

Copy link
Member

Choose a reason for hiding this comment

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

sounds good!

Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Comment on lines +210 to +213
"7kUi8J": {
"defaultMessage": "Duration:",
"description": "Row title for the duration of runs on the experiment compare runs page"
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might have to run the i18n extract script again to add unknown to the default strings here

Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
Signed-off-by: harupy <hkawamura0130@gmail.com>
@harupy harupy merged commit 8bc6b36 into mlflow:master Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/uiux Front-end, user experience, plotting, JavaScript, JavaScript dev server rn/feature Mention under Features in Changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants