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

Katib UI for v1alpha2 #486

Merged
merged 23 commits into from
May 17, 2019
Merged

Conversation

andreyvelich
Copy link
Member

@andreyvelich andreyvelich commented May 4, 2019

This PR about new UI for v1alpha2 version of Katib built with React.
The UI supports HP and NAS jobs.
You can find all functionality of this UI in the Youtube link:
https://www.youtube.com/watch?v=WAK37UW7spo

Fixes: #373, #443.

Backend is done, but need to be tested and fixed small issues.
Frontend needs to be changed according to new Backend. I marked in Backend what needs to be done. I have started to work on Frontend.
As well, I refactored folder structure to support both UI for v1alpha1 and v1alpha2 version.

Please, start to review it.
/assign @richardsliu @hougangliu @johnugeorge @YujiOshima
/cc @gaocegege @MattSich @jlewi

Developed by: @Akado2009 @andreyvelich


This change is Reviewable

@k8s-ci-robot
Copy link

@andreyvelich: GitHub didn't allow me to request PR reviews from the following users: MattSich, alex.

Note that only kubeflow members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

This PR about new UI for v1alpha2 version of Katib built with React.
The UI supports HP and NAS jobs.
You can find all functionality of this UI in the Youtube link:
https://www.youtube.com/watch?v=WAK37UW7spo

Fixes: #373, #443.

Backend is done, but need to be tested and fixed small issues.
Frontend needs to be changed according to new Backend. I marked in Backend what needs to be done. I have started to work on Frontend.
As well, I refactored folder structure to support both UI for v1alpha1 and v1alpha2 version.

Please, start to review it.
/assign @richardsliu @hougangliu @johnugeorge @YujiOshima
/cc @gaocegege @MattSich @alex

Developed by: @Akado2009 @andreyvelich

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jlewi jlewi mentioned this pull request May 13, 2019
@jlewi
Copy link
Contributor

jlewi commented May 13, 2019

@andreyvelich Is this PR blocked on something?

@andreyvelich
Copy link
Member Author

andreyvelich commented May 13, 2019

@jlewi Backend for the UI is done.
Frontend 80% is done, I will finish it to the end of the next week.
Need to test it, after other components for v1alpha2 Katib will be finished.
After I test it, we can merge this PR.

@andreyvelich
Copy link
Member Author

andreyvelich commented May 13, 2019

Frontend and Backend is done.
We need only test this UI with new Katib controller and functionality.
Please, take a look @richardsliu @hougangliu @johnugeorge @YujiOshima @gaocegege.
We can start to review it now.
Should I remove WIP status for now?

@hougangliu
Copy link
Member

Frontend and Backend is done.
We need only test this UI with new Katib controller and functionality.
Please, take a look @richardsliu @hougangliu @johnugeorge @YujiOshima @gaocegege.
We can start to review it now.
Should I remove WIP status for now?

@andreyvelich Good Job! I will talk a look in my day. Thanks!

conn, c := k.connectManager()
defer conn.Close()

defer conn.Close()
Copy link
Member

Choose a reason for hiding this comment

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

duplicated?

Copy link
Member Author

Choose a reason for hiding this comment

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

Deleted

kuh := ui.NewKatibUIHandler()

frontend := http.FileServer(http.Dir("/app/build/"))
http.Handle("/katib/", http.StripPrefix("/katib/", frontend))
Copy link
Member

Choose a reason for hiding this comment

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

there is only one deployment for UI, in a single container, both http server and logic to call Katib-manager to operate experiment/trial/metrics.. and converting the results are running, right?
I had thought there would be two deployments (frontend and backend).

Copy link
Member Author

Choose a reason for hiding this comment

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

It will be one deployment with frontend and backend.
All JS for frontend will be store in build folder here: https://github.com/andreyvelich/katib/tree/v1alpha2-new-ui/pkg/ui/v1alpha2/frontend/build/static.

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if the container works too heavy.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it will be fine, no reason to divide frontend and backend sides.
All frontend builds in a 3 JS files by React.

}

// TODO: Add delete job to Katib Client
func (k *KatibUIHandler) DeleteJob(w http.ResponseWriter, r *http.Request) {
Copy link
Member

Choose a reason for hiding this comment

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

delete experiment?

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed it


jobs := make([]JobView, 0)

el, err := k.katibClient.GetExperimentList()
Copy link
Member

Choose a reason for hiding this comment

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

I perfer we add filter in GetExperimentList db interface

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean filter for HP or NAS jobs?

Copy link
Member

Choose a reason for hiding this comment

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

yes, filter can help us filter we need in db server instead of our code implementation

Copy link
Member Author

Choose a reason for hiding this comment

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

Here we use Katib client, not db interface function. We can add filter in GetExperimentList in Katib Client, but is it make sense?

}

func (k *KatibUIHandler) SubmitHPJob(w http.ResponseWriter, r *http.Request) {
//enableCors(&w)
Copy link
Member

Choose a reason for hiding this comment

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

it seems there is no difference between SubmitNASJob and SubmitHPJob

Copy link
Member Author

Choose a reason for hiding this comment

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

Delete one

@gaocegege
Copy link
Member

I suggest removing WIP and try to merge it ASAP. Or we will meet with many conflicts since we are in active development.

@andreyvelich
Copy link
Member Author

@gaocegege I can fix Dockerfile structure and we can merge it, I think.

@gaocegege
Copy link
Member

gaocegege commented May 16, 2019

Should we wait for #527 ?

@andreyvelich
Copy link
Member Author

@gaocegege Yes, after that I can add builders for the UI.

@gaocegege
Copy link
Member

SGTM

@andreyvelich
Copy link
Member Author

I have added tests for the UI. I removed WIP status, after I pass the tests, I think, we can merge this PR.

@andreyvelich andreyvelich changed the title [WIP] Katib UI for v1alpha2 Katib UI for v1alpha2 May 16, 2019
@andreyvelich
Copy link
Member Author

Please, check it.
@hougangliu @richardsliu @gaocegege @johnugeorge

@johnugeorge
Copy link
Member

/lgtm

@andreyvelich Lets merge this. We will have fixes in targeted PRs

@richardsliu
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardsliu

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

@k8s-ci-robot k8s-ci-robot merged commit 4ec45bb into kubeflow:master May 17, 2019
@andreyvelich andreyvelich deleted the v1alpha2-new-ui branch October 6, 2021 00:23
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.

UI for Katib-NAS system
8 participants