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

Check Tensorboard Instance #3189

Merged
merged 17 commits into from
Mar 10, 2020
Merged

Check Tensorboard Instance #3189

merged 17 commits into from
Mar 10, 2020

Conversation

jingzhang36
Copy link
Contributor

@jingzhang36 jingzhang36 commented Feb 28, 2020

If instance is not fully up, we (1) disable open tensorboard button and (2) instead show a message asking user to wait. When the instance is up and ready, we show open tensorboard button.

Demo link (sorry this link might not be accessible to public) https://drive.google.com/file/d/1t4A1jjUTa63whv97gZ2IXgp21GT2U_Dq/view


This change is Reviewable

@Bobgy
Copy link
Contributor

Bobgy commented Feb 28, 2020

@jingzhang36 when you use the plugin, it has a button to publish your demo to Youtube as unlisted video. So far I've found that to be the easiest way to share.

Copy link
Contributor

@Bobgy Bobgy left a comment

Choose a reason for hiding this comment

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

Thanks, the idea is great. Left some detailed comments

frontend/report.20200228.153137.10348.0.001.json Outdated Show resolved Hide resolved
frontend/src/components/viewers/Tensorboard.tsx Outdated Show resolved Hide resolved
frontend/src/components/viewers/Tensorboard.tsx Outdated Show resolved Hide resolved
frontend/src/components/viewers/Tensorboard.tsx Outdated Show resolved Hide resolved
Comment on lines 142 to 144
this.state.tensorboardReady
? ''
: 'Tensorboard is starting, and you may need to wait for a few minutes.'
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this look like? Can you share a demo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@Bobgy Bobgy Mar 6, 2020

Choose a reason for hiding this comment

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

Thanks for the demo!
I worry the tooltip shows too slowly, it might be hard to notice if someone just quickly clicks the button.

I think some simple text warning at the bottom of under the button works great.
(because the warning may show up and disappear, if it is shown on the top of the button, that will change the button's position on the screen. So prefer on the bottom.)

Done. https://drive.google.com/file/d/1-PNljQz0OxwJp0doeRVZBYznhVBVFj9n/view --Jing

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

frontend/src/components/viewers/Tensorboard.tsx Outdated Show resolved Hide resolved
frontend/src/components/viewers/Tensorboard.tsx Outdated Show resolved Hide resolved
@Bobgy
Copy link
Contributor

Bobgy commented Mar 4, 2020

For mocking fetch, I think I prefer you move the fetch to Apis class, together with other tensorboard related apis and mock the corresponding Apis' method.

@k8s-ci-robot k8s-ci-robot added size/L and removed size/M labels Mar 5, 2020
@jingzhang36
Copy link
Contributor Author

/test kubeflow-pipeline-sample-test

frontend/src/components/viewers/Tensorboard.test.tsx Outdated Show resolved Hide resolved
frontend/src/components/viewers/Tensorboard.test.tsx Outdated Show resolved Hide resolved
frontend/src/lib/Apis.test.ts Outdated Show resolved Hide resolved
frontend/src/lib/Apis.test.ts Show resolved Hide resolved
Comment on lines 142 to 144
this.state.tensorboardReady
? ''
: 'Tensorboard is starting, and you may need to wait for a few minutes.'
Copy link
Contributor

@Bobgy Bobgy Mar 6, 2020

Choose a reason for hiding this comment

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

Thanks for the demo!
I worry the tooltip shows too slowly, it might be hard to notice if someone just quickly clicks the button.

I think some simple text warning at the bottom of under the button works great.
(because the warning may show up and disappear, if it is shown on the top of the button, that will change the button's position on the screen. So prefer on the bottom.)

Done. https://drive.google.com/file/d/1-PNljQz0OxwJp0doeRVZBYznhVBVFj9n/view --Jing

Comment on lines 286 to 288
await TestUtils.flushPromises();
jest.runOnlyPendingTimers();
await TestUtils.flushPromises();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we wrap these into a helper?
like flushPromisesAndTimers?

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

@Bobgy
Copy link
Contributor

Bobgy commented Mar 6, 2020

Fixes #2482

@jingzhang36
Copy link
Contributor Author

/assign @Bobgy

Copy link
Contributor

@Bobgy Bobgy left a comment

Choose a reason for hiding this comment

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

/lgtm
Some last minor comments

// If pod address is not null and tensorboard pod doesn't seem to be read, pull status again
if (this.state.podAddress && !this.state.tensorboardReady) {
Apis.isTensorboardPodReady(
'apis/v1beta1/_proxy/' + this.state.podAddress.replace(/(^\w+:|^)\/\//, ''),
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Can we have a comment explaining the regex here?

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

frontend/src/lib/Apis.ts Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm label Mar 10, 2020
@Bobgy
Copy link
Contributor

Bobgy commented Mar 10, 2020

/lgtm
/approve
Thanks! It's a really useful UX feature.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Bobgy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jingzhang36 jingzhang36 merged commit 5162e45 into kubeflow:master Mar 10, 2020
Jeffwan pushed a commit to Jeffwan/pipelines that referenced this pull request Dec 9, 2020
* Add tensorboard pod status check

* print debug log

* Need to keep pulling status if the first attemp to ping tb instance returns non-200

* add test

* revise comment

* use fetch instead of axios to send http head request

* remove accidentally checked-in files

* format

* address comments

* format

* address comments

* comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants