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

WIP: New UI #438

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
cf15cd4
Merge pull request #1 from kubeflow/master
Akado2009 Feb 24, 2019
b9d3294
UI without backend added
Akado2009 Mar 4, 2019
3c96661
filterting added on monitorin
Akado2009 Mar 4, 2019
33046ee
backend 40% done
Akado2009 Mar 5, 2019
99c0fdb
ismall fix
Akado2009 Mar 6, 2019
b94c8ee
table + additional plot adde
Akado2009 Mar 6, 2019
4590729
hp monitor
Akado2009 Mar 7, 2019
621c2c0
everything works
Akado2009 Mar 7, 2019
034c786
UI FIX FOR PARAMS
Akado2009 Mar 7, 2019
64a72fc
small fix
Akado2009 Mar 7, 2019
038f590
input/output size
Akado2009 Mar 7, 2019
a6abfb6
before fetch
Akado2009 Mar 8, 2019
4000db0
isdmall fix
Akado2009 Mar 8, 2019
3851f36
Merge pull request #3 from kubeflow/master
Akado2009 Mar 8, 2019
616d52b
ismall fix
Akado2009 Mar 8, 2019
7ca1a3a
FIX FOR DEMO| HOLD| EVERYTHING IS STATIC
Akado2009 Mar 13, 2019
b823431
Revert "FIX FOR DEMO| HOLD| EVERYTHING IS STATIC"
Akado2009 Mar 13, 2019
9de6717
ias
Akado2009 Mar 14, 2019
aabb89d
Monitor fixed
Akado2009 Mar 14, 2019
e8ad6ef
hp readyh
Akado2009 Mar 20, 2019
8d11741
almost everything
Akado2009 Mar 21, 2019
30324cf
TODO UPDATE
Akado2009 Mar 21, 2019
24b1a5d
moving to containerized version
Akado2009 Mar 21, 2019
dd95ae0
fional fverison almost
Akado2009 Mar 22, 2019
4edbb0f
ismall fix
Akado2009 Mar 22, 2019
6fed5e9
ismall
Akado2009 Mar 22, 2019
c6426dc
ialso everytyhing fixed
Akado2009 Mar 23, 2019
30fa065
almost
Akado2009 Mar 23, 2019
7dd1359
small fix
Akado2009 Mar 25, 2019
5399aab
finalk fix
Akado2009 Mar 26, 2019
addd36b
get rid of bin/todo
Akado2009 Mar 26, 2019
4e62819
deleted package-lock
Akado2009 Mar 26, 2019
bbd3186
Revert "small fixes"
Akado2009 Apr 23, 2019
57a7ea0
Merge remote-tracking branch 'upstream/master' into HEAD
Akado2009 Apr 23, 2019
e799d34
imerge master
Akado2009 Apr 23, 2019
502169e
save deleted
Akado2009 Apr 23, 2019
936b68a
prop-types added
Akado2009 Apr 23, 2019
db79620
yarn.lock deleted
Akado2009 Apr 23, 2019
40d435e
build added
Akado2009 Apr 24, 2019
a3955c3
newline added
Akado2009 Apr 25, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
746 changes: 42 additions & 704 deletions Gopkg.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,7 @@ required = [
[[constraint]]
name = "github.com/kubeflow/pytorch-operator"
version = "0.5.0-rc.1"

[[constraint]]
name = "github.com/awalterschulze/gographviz"
branch = "master"
27 changes: 27 additions & 0 deletions cmd/new-non-cont-ui/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package main

import (
"net/http"

"github.com/kubeflow/katib/pkg/ui"
)

func main() {
kuh := ui.NewKatibUIHandler()

http.HandleFunc("/katib/fetch_hp_jobs/", kuh.FetchHPJobs)
http.HandleFunc("/katib/fetch_nas_jobs/", kuh.FetchNASJobs)
http.HandleFunc("/katib/submit_yaml/", kuh.SubmitYamlJob)
http.HandleFunc("/katib/submit_hp_job/", kuh.SubmitHPJob)
http.HandleFunc("/katib/submit_nas_job/", kuh.SubmitNASJob)

http.HandleFunc("/katib/fetch_hp_job_info/", kuh.FetchJobInfo)
http.HandleFunc("/katib/fetch_nas_job_info/", kuh.FetchNASJobInfo)
http.HandleFunc("/katib/fetch_worker_info/", kuh.FetchWorkerInfo)
http.HandleFunc("/katib/fetch_worker_templates/", kuh.FetchWorkerTemplates)
http.HandleFunc("/katib/fetch_collector_templates/", kuh.FetchCollectorTemplates)
http.HandleFunc("/katib/update_template/", kuh.AddEditTemplate)
http.HandleFunc("/katib/delete_template/", kuh.DeleteTemplate)

http.ListenAndServe(":9303", nil)
}
13 changes: 13 additions & 0 deletions cmd/new-ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM golang:alpine AS build-env
# The GOPATH in the image is /go.
# FOR NOW IT IS NEW-UI
ADD . /go/src/github.com/kubeflow/katib
WORKDIR /go/src/github.com/kubeflow/katib/cmd/new-ui
RUN go build -o katib-ui

FROM alpine:3.7
WORKDIR /app
COPY --from=build-env /go/src/github.com/kubeflow/katib/cmd/new-ui/katib-ui /app/
COPY --from=build-env /go/src/github.com/kubeflow/katib/pkg/ui/frontend/build/ /app/build
ENTRYPOINT ["/app/katib-ui"]
EXPOSE 80
35 changes: 35 additions & 0 deletions cmd/new-ui/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package main

import (
"net/http"

"github.com/kubeflow/katib/pkg/ui"
)

var (
port = "80"
)

func main() {
kuh := ui.NewKatibUIHandler()

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

http.HandleFunc("/katib/fetch_hp_jobs/", kuh.FetchHPJobs)
http.HandleFunc("/katib/fetch_nas_jobs/", kuh.FetchNASJobs)
http.HandleFunc("/katib/submit_yaml/", kuh.SubmitYamlJob)
http.HandleFunc("/katib/submit_hp_job/", kuh.SubmitHPJob)
http.HandleFunc("/katib/submit_nas_job/", kuh.SubmitNASJob)
http.HandleFunc("/katib/delete_job/", kuh.DeleteJob)

http.HandleFunc("/katib/fetch_hp_job_info/", kuh.FetchJobInfo)
http.HandleFunc("/katib/fetch_nas_job_info/", kuh.FetchNASJobInfo)
http.HandleFunc("/katib/fetch_worker_info/", kuh.FetchWorkerInfo)
http.HandleFunc("/katib/fetch_worker_templates/", kuh.FetchWorkerTemplates)
http.HandleFunc("/katib/fetch_collector_templates/", kuh.FetchCollectorTemplates)
http.HandleFunc("/katib/update_template/", kuh.AddEditTemplate)
http.HandleFunc("/katib/delete_template/", kuh.DeleteTemplate)

http.ListenAndServe(":"+port, nil)
}
3 changes: 2 additions & 1 deletion cmd/ui/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"net/http"

"github.com/kubeflow/katib/pkg/ui"
"github.com/pressly/chi"
"net/http"
)

func main() {
Expand Down
11 changes: 4 additions & 7 deletions examples/v1alpha1/nasjob-example-RL.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
apiVersion: "kubeflow.org/v1alpha1"
kind: StudyJob
metadata:
namespace: kubeflow
namespace: default
labels:
controller-tools.k8s.io: "1.0"
name: nas-rl-example
Expand Down Expand Up @@ -133,23 +133,20 @@ spec:
spec:
containers:
- name: {{.WorkerID}}
image: docker.io/deepermind/training-container-nas
image: docker.io/deepermind/training-container-cpu
command:
- "python3.5"
- "python3"
- "-u"
- "RunTrial.py"
{{- with .HyperParameters}}
{{- range .}}
- "--{{.Name}}={{.Value}}"
{{- end}}
{{- end}}
resources:
limits:
nvidia.com/gpu: 1
restartPolicy: Never
suggestionSpec:
suggestionAlgorithm: "nasrl"
requestNumber: 3
requestNumber: 1
suggestionParameters:
- name: "lstm_num_cells"
value: "64"
Copy link
Member

Choose a reason for hiding this comment

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

Please, remove changes in the yaml files.

Expand Down
29 changes: 4 additions & 25 deletions examples/v1alpha1/random-example.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: "kubeflow.org/v1alpha1"
kind: StudyJob
metadata:
namespace: kubeflow
namespace: default
labels:
controller-tools.k8s.io: "1.0"
name: random-example
name: random1-example-v2222
spec:
studyName: random-example
studyName: random1-example-v2222
owner: crd
optimizationtype: maximize
objectivevaluename: Validation-accuracy
Expand Down Expand Up @@ -34,28 +34,7 @@ spec:
- ftrl
workerSpec:
goTemplate:
rawTemplate: |-
apiVersion: batch/v1
kind: Job
metadata:
name: {{.WorkerID}}
namespace: kubeflow
spec:
template:
spec:
containers:
- name: {{.WorkerID}}
image: katib/mxnet-mnist-example
command:
- "python"
- "/mxnet/example/image-classification/train_mnist.py"
- "--batch-size=64"
{{- with .HyperParameters}}
{{- range .}}
- "{{.Name}}={{.Value}}"
{{- end}}
{{- end}}
restartPolicy: Never
templatePath: "cpuWorkerTemplate.yaml"
suggestionSpec:
suggestionAlgorithm: "random"
requestNumber: 3
4 changes: 2 additions & 2 deletions manifests/v1alpha1/vizier/suggestion/nasrl/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: vizier-suggestion-nasrl
namespace: kubeflow
namespace: default
labels:
app: vizier
component: suggestion-nasrl
Expand All @@ -17,7 +17,7 @@ spec:
spec:
containers:
- name: vizier-suggestion-nasrl
image: katib/suggestion-nasrl
image: docker.io/deepermind/katib-nasrl-suggestion
ports:
- name: api
containerPort: 6789
2 changes: 1 addition & 1 deletion manifests/v1alpha1/vizier/suggestion/nasrl/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: vizier-suggestion-nasrl
namespace: kubeflow
namespace: default
labels:
app: vizier
component: suggestion-nasrl
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const (
VizierServiceNamespaceEnvName = "VIZIER_CORE_NAMESPACE"
VizierService = "vizier-core"
VizierPort = "6789"
ManagerAddr = VizierService + ":" + VizierPort
ManagerAddr = VizierService + ":" + VizierPort
)

func GetManagerAddr() string {
Expand Down
Loading