From 69d097ececd906e36b968cf204c3636627220b77 Mon Sep 17 00:00:00 2001 From: Andrey Velichkevich Date: Wed, 12 Jun 2019 22:58:13 -0700 Subject: [PATCH] UI: Show only succeeded Trials (#646) * Show only succeeded trials * Create build --- pkg/ui/v1alpha2/backend.go | 108 +++++++++--------- .../frontend/build/asset-manifest.json | 4 +- pkg/ui/v1alpha2/frontend/build/index.html | 2 +- ...ifest.688d4f0a6a704321c7606d0910c524a0.js} | 6 +- .../v1alpha2/frontend/build/service-worker.js | 2 +- .../build/static/js/main.16d6cce4.chunk.js | 1 - .../build/static/js/main.bf4e0f37.chunk.js | 1 + .../src/components/HP/Monitor/HPJobPlot.jsx | 34 +++--- .../src/components/HP/Monitor/HPJobTable.jsx | 58 +++++----- 9 files changed, 111 insertions(+), 105 deletions(-) rename pkg/ui/v1alpha2/frontend/build/{precache-manifest.6984ac908418813ab69850ccdffb4cd8.js => precache-manifest.688d4f0a6a704321c7606d0910c524a0.js} (72%) delete mode 100644 pkg/ui/v1alpha2/frontend/build/static/js/main.16d6cce4.chunk.js create mode 100644 pkg/ui/v1alpha2/frontend/build/static/js/main.bf4e0f37.chunk.js diff --git a/pkg/ui/v1alpha2/backend.go b/pkg/ui/v1alpha2/backend.go index fc34feabcde..b13f5455bff 100644 --- a/pkg/ui/v1alpha2/backend.go +++ b/pkg/ui/v1alpha2/backend.go @@ -231,33 +231,33 @@ func (k *KatibUIHandler) FetchHPJobInfo(w http.ResponseWriter, r *http.Request) } log.Printf("Got Trial List") - resultText += "\n" - for _, t := range trialListResp.Trials { - obsLogResp, err := c.GetObservationLog( - context.Background(), - &api_pb_v1alpha2.GetObservationLogRequest{ - TrialName: t.Name, - StartTime: "", - EndTime: "", - }, - ) - if err != nil { - log.Printf("GetObservationLog from HP job failed: %v", err) - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } + if t.Status.Condition == api_pb_v1alpha2.TrialStatus_SUCCEEDED { + obsLogResp, err := c.GetObservationLog( + context.Background(), + &api_pb_v1alpha2.GetObservationLogRequest{ + TrialName: t.Name, + StartTime: "", + EndTime: "", + }, + ) + if err != nil { + log.Printf("GetObservationLog from HP job failed: %v", err) + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } - trialResText := make([]string, len(metricsList)+len(paramList)) - for _, m := range obsLogResp.ObservationLog.MetricLogs { - trialResText[metricsList[m.Metric.Name]] = m.Metric.Value + trialResText := make([]string, len(metricsList)+len(paramList)) + for _, m := range obsLogResp.ObservationLog.MetricLogs { + trialResText[metricsList[m.Metric.Name]] = m.Metric.Value + } + for _, trialParam := range t.Spec.ParameterAssignments.Assignments { + trialResText[paramList[trialParam.Name]] = trialParam.Value + } + resultText += "\n" + t.Name + "," + strings.Join(trialResText, ",") } - for _, trialParam := range t.Spec.ParameterAssignments.Assignments { - trialResText[paramList[trialParam.Name]] = trialParam.Value - } - resultText += t.Name + "," + strings.Join(trialResText, ",") + "\n" } log.Printf("Logs parsed, result: %v", resultText) response, err := json.Marshal(resultText) @@ -337,41 +337,43 @@ func (k *KatibUIHandler) FetchNASJobInfo(w http.ResponseWriter, r *http.Request) for i, t := range trialListResp.Trials { - obsLogResp, err := c.GetObservationLog( - context.Background(), - &api_pb_v1alpha2.GetObservationLogRequest{ - TrialName: t.Name, - StartTime: "", - EndTime: "", - }, - ) - if err != nil { - log.Printf("GetObservationLog from NAS job failed: %v", err) - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - metricsName := make([]string, 0) - metricsValue := make([]string, 0) - for _, m := range obsLogResp.ObservationLog.MetricLogs { - metricsName = append(metricsName, m.Metric.Name) - metricsValue = append(metricsValue, m.Metric.Value) + if t.Status.Condition == api_pb_v1alpha2.TrialStatus_SUCCEEDED { + obsLogResp, err := c.GetObservationLog( + context.Background(), + &api_pb_v1alpha2.GetObservationLogRequest{ + TrialName: t.Name, + StartTime: "", + EndTime: "", + }, + ) + if err != nil { + log.Printf("GetObservationLog from NAS job failed: %v", err) + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + metricsName := make([]string, 0) + metricsValue := make([]string, 0) + for _, m := range obsLogResp.ObservationLog.MetricLogs { + metricsName = append(metricsName, m.Metric.Name) + metricsValue = append(metricsValue, m.Metric.Value) - } - for _, trialParam := range t.Spec.ParameterAssignments.Assignments { - if trialParam.Name == "architecture" { - architecture = trialParam.Value } - if trialParam.Name == "nn_config" { - decoder = trialParam.Value + for _, trialParam := range t.Spec.ParameterAssignments.Assignments { + if trialParam.Name == "architecture" { + architecture = trialParam.Value + } + if trialParam.Name == "nn_config" { + decoder = trialParam.Value + } } + responseRaw = append(responseRaw, NNView{ + Name: "Generation " + strconv.Itoa(i), + TrialName: t.Name, + Architecture: generateNNImage(architecture, decoder), + MetricsName: metricsName, + MetricsValue: metricsValue, + }) } - responseRaw = append(responseRaw, NNView{ - Name: "Generation " + strconv.Itoa(i), - TrialName: t.Name, - Architecture: generateNNImage(architecture, decoder), - MetricsName: metricsName, - MetricsValue: metricsValue, - }) } log.Printf("Logs parsed, result: %v", responseRaw) diff --git a/pkg/ui/v1alpha2/frontend/build/asset-manifest.json b/pkg/ui/v1alpha2/frontend/build/asset-manifest.json index 6df93d2d0de..9ea277fa6e6 100644 --- a/pkg/ui/v1alpha2/frontend/build/asset-manifest.json +++ b/pkg/ui/v1alpha2/frontend/build/asset-manifest.json @@ -1,9 +1,9 @@ { - "main.js": "./static/js/main.16d6cce4.chunk.js", + "main.js": "./static/js/main.bf4e0f37.chunk.js", "runtime~main.js": "./static/js/runtime~main.d653cc00.js", "static/css/2.3e32d45a.chunk.css": "./static/css/2.3e32d45a.chunk.css", "static/js/2.f25c288f.chunk.js": "./static/js/2.f25c288f.chunk.js", "index.html": "./index.html", - "precache-manifest.6984ac908418813ab69850ccdffb4cd8.js": "./precache-manifest.6984ac908418813ab69850ccdffb4cd8.js", + "precache-manifest.688d4f0a6a704321c7606d0910c524a0.js": "./precache-manifest.688d4f0a6a704321c7606d0910c524a0.js", "service-worker.js": "./service-worker.js" } \ No newline at end of file diff --git a/pkg/ui/v1alpha2/frontend/build/index.html b/pkg/ui/v1alpha2/frontend/build/index.html index 2fd003c03d1..3938fa0081a 100644 --- a/pkg/ui/v1alpha2/frontend/build/index.html +++ b/pkg/ui/v1alpha2/frontend/build/index.html @@ -1 +1 @@ -Katib UI
\ No newline at end of file +Katib UI
\ No newline at end of file diff --git a/pkg/ui/v1alpha2/frontend/build/precache-manifest.6984ac908418813ab69850ccdffb4cd8.js b/pkg/ui/v1alpha2/frontend/build/precache-manifest.688d4f0a6a704321c7606d0910c524a0.js similarity index 72% rename from pkg/ui/v1alpha2/frontend/build/precache-manifest.6984ac908418813ab69850ccdffb4cd8.js rename to pkg/ui/v1alpha2/frontend/build/precache-manifest.688d4f0a6a704321c7606d0910c524a0.js index 09e2bfc2442..047d389db3b 100644 --- a/pkg/ui/v1alpha2/frontend/build/precache-manifest.6984ac908418813ab69850ccdffb4cd8.js +++ b/pkg/ui/v1alpha2/frontend/build/precache-manifest.688d4f0a6a704321c7606d0910c524a0.js @@ -4,8 +4,8 @@ self.__precacheManifest = [ "url": "./static/js/runtime~main.d653cc00.js" }, { - "revision": "a90e81680f4132e28cad", - "url": "./static/js/main.16d6cce4.chunk.js" + "revision": "c15ec395f085a2064a95", + "url": "./static/js/main.bf4e0f37.chunk.js" }, { "revision": "6cfd875360e0c8691af9", @@ -16,7 +16,7 @@ self.__precacheManifest = [ "url": "./static/css/2.3e32d45a.chunk.css" }, { - "revision": "bf2f46e0a6dd0755963ab2564fe2ca78", + "revision": "ba1ed30f2eb9408dab4638479885232a", "url": "./index.html" } ]; \ No newline at end of file diff --git a/pkg/ui/v1alpha2/frontend/build/service-worker.js b/pkg/ui/v1alpha2/frontend/build/service-worker.js index 0f72ee9c61a..7139d9588b5 100644 --- a/pkg/ui/v1alpha2/frontend/build/service-worker.js +++ b/pkg/ui/v1alpha2/frontend/build/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js"); importScripts( - "./precache-manifest.6984ac908418813ab69850ccdffb4cd8.js" + "./precache-manifest.688d4f0a6a704321c7606d0910c524a0.js" ); workbox.clientsClaim(); diff --git a/pkg/ui/v1alpha2/frontend/build/static/js/main.16d6cce4.chunk.js b/pkg/ui/v1alpha2/frontend/build/static/js/main.16d6cce4.chunk.js deleted file mode 100644 index 18fdf0355b4..00000000000 --- a/pkg/ui/v1alpha2/frontend/build/static/js/main.16d6cce4.chunk.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{279:function(e,a){},280:function(e,a){},356:function(e,a,t){e.exports=t(625)},600:function(e,a){},625:function(e,a,t){"use strict";t.r(a);var n=t(0),r=t.n(n),l=t(50),c=t.n(l),i=t(20),o=t.n(i),m=t(159),s=t.n(m),u=t(160),p=t.n(u),E=t(12),d=t.n(E),b=t(40),f=t.n(b),g=t(290),h=t.n(g),v=t(627),T=t(220),_=t(158),O=t.n(_),y=t(75),x=t.n(y),S=t(76),N=t.n(S),A=t(51),j=t.n(A),C=t(52),k=t.n(C),L=t(53),I=t.n(L),M=t(116),P=t.n(M),R=t(287),D=t.n(R),F=t(216),w=t.n(F),H=t(217),U=t.n(H),B=t(288),J=t.n(B),G=t(218),z=t.n(G),Y=t(215),Q=t.n(Y),W=t(104),X=t.n(W),V=t(289),K=t.n(V),Z=t(11),$=function(e){return{type:"TOGGLE_MENU",state:e}},q=function(e){return{type:"SUBMIT_YAML_REQUEST",yaml:e}},ee=function(e){return{type:"OPEN_DELETE_EXPERIMENT_DIALOG",experimentName:e}},ae=o()({list:{width:250},nested:{paddingLeft:40}}),te=Object(Z.b)(function(e){return{menuOpen:e.general.menuOpen}},{toggleMenu:$})(function(e){var a=r.a.useState(!1),t=Object(T.a)(a,2),n=t[0],l=t[1],c=r.a.useState(!1),i=Object(T.a)(c,2),o=i[0],m=i[1],s=ae(),u="primary";return r.a.createElement("div",null,r.a.createElement(O.a,{open:e.menuOpen,onClose:function(){e.toggleMenu(!1)}},r.a.createElement(x.a,null,r.a.createElement(j.a,{button:!0,onClick:function(){l(!n)}},r.a.createElement(k.a,null,r.a.createElement(D.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"HP")),n?r.a.createElement(Q.a,null):r.a.createElement(X.a,null)),r.a.createElement(P.a,{in:n,timeout:"auto",unmountOnExit:!0},r.a.createElement(x.a,{component:"div",disablePadding:!0},r.a.createElement(j.a,{button:!0,className:s.nested,component:v.a,to:"/katib/hp"},r.a.createElement(k.a,null,r.a.createElement(w.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"Submit"))),r.a.createElement(j.a,{button:!0,className:s.nested,component:v.a,to:"/katib/hp_monitor"},r.a.createElement(k.a,null,r.a.createElement(U.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"Monitor"))))),r.a.createElement(N.a,null),r.a.createElement(j.a,{button:!0,onClick:function(){m(!o)}},r.a.createElement(k.a,null,r.a.createElement(J.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"NAS")),n?r.a.createElement(Q.a,null):r.a.createElement(X.a,null)),r.a.createElement(P.a,{in:o,timeout:"auto",unmountOnExit:!0},r.a.createElement(x.a,{component:"div",disablePadding:!0},r.a.createElement(j.a,{button:!0,className:s.nested,component:v.a,to:"/katib/nas"},r.a.createElement(k.a,null,r.a.createElement(w.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"Submit"))),r.a.createElement(j.a,{button:!0,className:s.nested,component:v.a,to:"/katib/nas_monitor"},r.a.createElement(k.a,null,r.a.createElement(U.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"Monitor"))))),r.a.createElement(N.a,null),r.a.createElement(j.a,{button:!0,component:v.a,to:"/katib/trial"},r.a.createElement(k.a,null,r.a.createElement(z.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"Trial Manifests"))),r.a.createElement(N.a,null),r.a.createElement(j.a,{button:!0,component:v.a,to:"/katib/collector"},r.a.createElement(k.a,null,r.a.createElement(z.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"Metrics Collector Manifests"))),r.a.createElement(N.a,null),r.a.createElement(j.a,{button:!0,component:v.a,to:"/katib/about"},r.a.createElement(k.a,null,r.a.createElement(K.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"About"))))))}),ne=o()({root:{flexGrow:1},grow:{flexGrow:1},menuButton:{marginLeft:-12,marginRight:20},link:{textDecoration:"none"}}),re=Object(Z.b)(null,{toggleMenu:$})(function(e){var a=ne();return r.a.createElement("div",{className:a.root},r.a.createElement(s.a,{position:"static",color:"primary"},r.a.createElement(p.a,null,r.a.createElement(f.a,{className:a.menuButton,color:"inherit","aria-label":"Menu",onClick:function(a){e.toggleMenu(!0)}},r.a.createElement(h.a,null)),r.a.createElement(d.a,{variant:"headline",color:"secondary",component:v.a,to:"/",classes:a.link},"Katib")),r.a.createElement(te,null)))}),le=t(161),ce=t.n(le),ie=t(291),oe=t.n(ie),me=o()({root:{flexGrow:1,marginTop:40},close:{padding:4}}),se=Object(Z.b)(function(e){return{snackText:e.general.snackText,snackOpen:e.general.snackOpen}},{closeSnackbar:function(){return{type:"CLOSE_SNACKBAR"}}})(function(e){var a=me();return r.a.createElement(ce.a,{anchorOrigin:{vertical:"top",horizontal:"center"},open:e.snackOpen,autoHideDuration:600,onClose:e.handleClose,ContentProps:{"aria-describedby":"message-id"},message:r.a.createElement("span",{id:"message-id"},e.snackText),action:[r.a.createElement(f.a,{key:"close","aria-label":"Close",color:"inherit",className:a.close,onClick:e.closeSnackbar},r.a.createElement(oe.a,null))]})}),ue=t(124),pe=t(630),Ee=t(62),de=t.n(Ee),be=t(5),fe=t.n(be),ge=Object(ue.a)({root:{margin:"0 auto",marginTop:50,flexGrow:1,width:"50%",height:400,textAlign:"center"},item:{padding:"40px !important"},block:{backgroundColor:"#4e4e4e",height:"100%",width:"100%",padding:40,"&:hover":{backgroundColor:"black"}}}),he=function(e){var a=ge();return r.a.createElement(de.a,{elevation:4,className:a.root},r.a.createElement(d.a,{variant:"h4"},"Welcome to Katib"),r.a.createElement(d.a,{variant:"h6"},"Choose type of experiment"),r.a.createElement("br",null),r.a.createElement(fe.a,{container:!0,spacing:40,alignContent:"center"},r.a.createElement(fe.a,{item:!0,xs:6,className:a.item,component:v.a,to:"/katib/hp/"},r.a.createElement(de.a,{className:a.block},r.a.createElement(d.a,{variant:"h6",color:"secondary"},"Hyperparameter Tuning"))),r.a.createElement(fe.a,{item:!0,xs:6,className:a.item,component:v.a,to:"/katib/nas/"},r.a.createElement(de.a,{className:a.block},r.a.createElement(d.a,{variant:"h6",color:"secondary"},"Neural Architecture Search")))),r.a.createElement("br",null),r.a.createElement(d.a,{variant:"h6"},"For additional information on Kubeflow visit ",r.a.createElement("a",{href:"https://kubeflow.org",target:"_blank",className:a.link},"website")),r.a.createElement(d.a,{variant:"h6"},"For additional information on Katib visit ",r.a.createElement("a",{href:"https://github.com/kubeflow/katib/",target:"_blank",className:a.link},"github")))},ve=t(628),Te=(t(250),t(251),t(252),t(125)),_e=t.n(Te),Oe=t(16),ye=t.n(Oe),xe=o()({root:{flexGrow:1},editor:{margin:"0 auto"},submit:{textAlign:"center",marginTop:10},progress:{height:10,margin:10},close:{padding:4}}),Se=Object(Z.b)(function(e){return{yaml:e.hpCreate.currentYaml}},{changeYaml:function(e){return{type:"CHANGE_YAML_HP",payload:e}},submitYaml:q})(function(e){var a=xe();return r.a.createElement("div",{className:a.root},r.a.createElement("h1",null,"Generate"),r.a.createElement("hr",null),r.a.createElement("div",{className:a.editor},r.a.createElement(_e.a,{mode:"text",theme:"tomorrow",value:e.yaml,onChange:function(a){e.changeYaml(a)},name:"yaml-editor",editorProps:{$blockScrolling:!0},tabSize:2,enableLiveAutocompletion:!0,fontSize:14,width:"100%",height:700})),r.a.createElement("div",{className:a.submit},r.a.createElement(ye.a,{variant:"contained",color:"primary",className:a.button,onClick:function(){e.submitYaml(e.yaml)}},"Deploy")))}),Ne=t(49),Ae=t.n(Ne),je=t(31),Ce=t.n(je),ke=t(39),Le=t.n(ke),Ie=t(18),Me=t.n(Ie),Pe=o()({textField:{marginLeft:4,marginRight:4,width:"100%"},help:{padding:2,verticalAlign:"middle",marginRight:5},parameter:{padding:2,marginBottom:10}}),Re=Object(Z.b)(function(e){return{commonParametersMetadata:e.hpCreate.commonParametersMetadata}},{changeMeta:function(e,a){return{type:"CHANGE_META_HP",name:e,value:a}}})(function(e){var a=Pe(),t=function(a){return function(t){e.changeMeta(a,t.target.value)}};return r.a.createElement("div",null,e.commonParametersMetadata.map(function(e,n){return r.a.createElement("div",{key:n,className:a.parameter},r.a.createElement(fe.a,{container:!0,alignItems:"center"},r.a.createElement(fe.a,{item:!0,xs:12,sm:3},r.a.createElement(d.a,{variant:"subheading"},r.a.createElement(Ce.a,{title:e.description},r.a.createElement(Le.a,{className:a.help,color:"primary"})),e.name)),r.a.createElement(fe.a,{item:!0,xs:12,sm:8},r.a.createElement(Me.a,{className:a.textField,value:e.value,onChange:t(e.name)}))))}))}),De=o()({textField:{marginLeft:4,marginRight:4,width:"100%"},help:{padding:2,verticalAlign:"middle",marginRight:5},parameter:{padding:2,marginBottom:10}}),Fe=Object(Z.b)(function(e){return{commonParametersSpec:e.hpCreate.commonParametersSpec}},{changeSpec:function(e,a){return{type:"CHANGE_SPEC_HP",name:e,value:a}}})(function(e){var a=De();return r.a.createElement("div",null,e.commonParametersSpec.map(function(t,n){return r.a.createElement("div",{key:n,className:a.parameter},r.a.createElement(fe.a,{container:!0,alignItems:"center"},r.a.createElement(fe.a,{item:!0,xs:12,sm:3},r.a.createElement(d.a,{variant:"subheading"},r.a.createElement(Ce.a,{title:t.description},r.a.createElement(Le.a,{className:a.help,color:"primary"})),t.name)),r.a.createElement(fe.a,{item:!0,xs:12,sm:8},r.a.createElement(Me.a,{className:a.textField,value:t.value,onChange:(l=t.name,function(a){e.changeSpec(l,a.target.value)})}))));var l}))}),we=t(45),He=t.n(we),Ue=t(71),Be=t.n(Ue),Je=t(83),Ge=t.n(Je),ze=o()({textField:{marginLeft:4,marginRight:4,width:"100%"},help:{padding:2,verticalAlign:"middle",marginRight:5},parameter:{padding:2,marginBottom:10}}),Ye=Object(Z.b)(function(e){return{objective:e.hpCreate.objective,additionalMetricNames:e.hpCreate.additionalMetricNames}},{changeObjective:function(e,a){return{type:"CHANGE_OBJECTIVE_HP",name:e,value:a}},addMetrics:function(){return{type:"ADD_METRICS_HP"}},editMetrics:function(e,a){return{type:"EDIT_METRICS_HP",index:e,value:a}},deleteMetrics:function(e){return{type:"DELETE_METRICS_HP",index:e}}})(function(e){var a=ze(),t=function(a){return function(t){e.deleteMetrics(a)}};return r.a.createElement("div",null,e.objective.map(function(t,n){return r.a.createElement("div",{key:n,className:a.parameter},r.a.createElement(fe.a,{container:!0,alignItems:"center"},r.a.createElement(fe.a,{item:!0,xs:12,sm:3},r.a.createElement(d.a,{variant:"subheading"},r.a.createElement(Ce.a,{title:t.description},r.a.createElement(Le.a,{className:a.help,color:"primary"})),t.name)),r.a.createElement(fe.a,{item:!0,xs:12,sm:8},r.a.createElement(Me.a,{className:a.textField,value:t.value,onChange:(l=t.name,function(a){e.changeObjective(l,a.target.value)})}))));var l}),r.a.createElement("div",{className:a.parameter},r.a.createElement(fe.a,{container:!0,alignItems:"center"},r.a.createElement(fe.a,{item:!0,xs:12,sm:3},r.a.createElement(d.a,{variant:"subheading"},r.a.createElement(Ce.a,{title:"Additional metrics that you want to collect"},r.a.createElement(Le.a,{className:a.help,color:"primary"})),"AdditionalMetricNames")),r.a.createElement(fe.a,{item:!0,xs:12,sm:8},e.additionalMetricNames.map(function(n,l){return r.a.createElement(fe.a,{container:!0},r.a.createElement(fe.a,{item:!0,xs:10},r.a.createElement(Me.a,{className:a.textField,value:n.value,onChange:(c=l,function(a){e.editMetrics(c,a.target.value)})})),r.a.createElement(fe.a,{item:!0,xs:2},r.a.createElement(f.a,{key:"close","aria-label":"Close",color:"primary",className:a.icon,onClick:t(l)},r.a.createElement(He.a,null))));var c})),r.a.createElement(fe.a,{item:!0,xs:12,sm:1},r.a.createElement(Be.a,{color:"primary",className:a.fab,onClick:e.addMetrics},r.a.createElement(Ge.a,null))))))}),Qe=t(34),We=t(35),Xe=t(37),Ve=t(36),Ke=t(38),Ze=t(56),$e=t.n(Ze),qe=t(57),ea=t.n(qe),aa=t(63),ta=t.n(aa),na=t(58),ra=t.n(na),la=t(59),ca=t.n(la),ia=function(e){return{type:"CLOSE_DIALOG",dialogType:e}},oa=function(e){return{type:"OPEN_DIALOG",dialogType:e,index:arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,templateType:arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1}},ma=function(){return{type:"FETCH_TRIAL_TEMPLATES_REQUEST"}},sa=function(e){function a(){var e,t;Object(Qe.a)(this,a);for(var n=arguments.length,r=new Array(n),l=0;l0&&void 0!==arguments[0]?arguments[0]:zn,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"TOGGLE_MENU":return Object(Gn.a)({},e,{menuOpen:a.state});case"CLOSE_SNACKBAR":return Object(Gn.a)({},e,{snackOpen:!1});case"SUBMIT_YAML_SUCCESS":return Object(Gn.a)({},e,{snackOpen:!0,snackText:"Successfully submitted"});case"SUBMIT_YAML_FAILURE":return Object(Gn.a)({},e,{snackOpen:!0,snackText:a.message});case"DELETE_EXPERIMENT_FAILURE":return Object(Gn.a)({},e,{deleteDialog:!1,snackOpen:!0,snackText:"Whoops, something went wrong"});case"DELETE_EXPERIMENT_SUCCESS":return Object(Gn.a)({},e,{deleteDialog:!1,snackOpen:!0,snackText:"Successfully deleted. Press Update button"});case"OPEN_DELETE_EXPERIMENT_DIALOG":return Object(Gn.a)({},e,{deleteDialog:!0,deleteExperimentName:a.experimentName});case"CLOSE_DELETE_EXPERIMENT_DIALOG":return Object(Gn.a)({},e,{deleteDialog:!1});case"SUBMIT_NAS_JOB_REQUEST":return Object(Gn.a)({},e,{loading:!0});case"SUBMIT_NAS_JOB_SUCCESS":return Object(Gn.a)({},e,{loading:!1,snackOpen:!0,snackText:"Successfully submitted"});case"SUBMIT_NAS_JOB_FAILURE":return Object(Gn.a)({},e,{loading:!1,snackOpen:!0,snackText:a.message});case"SUBMIT_HP_JOB_REQUEST":return Object(Gn.a)({},e,{loading:!0});case"SUBMIT_HP_JOB_SUCCESS":return Object(Gn.a)({},e,{loading:!1,snackOpen:!0,snackText:"Successfully submitted"});case"SUBMIT_HP_JOB_FAILURE":return Object(Gn.a)({},e,{loading:!1,snackOpen:!0,snackText:a.message});default:return e}},Qn={commonParametersMetadata:[{name:"Name",value:"nasrl-example",description:"A name of an experiment"},{name:"Namespace",value:"kubeflow",description:"Namespace to deploy an experiment"}],commonParametersSpec:[{name:"ParallelTrialCount",value:"3",description:"How many trials can be processed in parallel"},{name:"MaxTrialCount",value:"12",description:"Max completed trials to mark experiment as succeeded"},{name:"MaxFailedTrialCount",value:"3",description:"Max failed trials to mark experiment as failed"}],objective:[{name:"Type",value:"maximize",description:"Type of optimization"},{name:"Goal",value:"0.99",description:"Goal of optimization"},{name:"ObjectiveMetricName",value:"Validation-Accuracy",description:"Name for the objective metric"}],additionalMetricNames:[],algorithmName:"nasrl",allAlgorithms:["nasrl","nasenvelopenet"],algorithmSettings:[{name:"lstm_num_cells",value:"64"},{name:"lstm_num_layers",value:"1"},{name:"lstm_keep_prob",value:"1.0"},{name:"optimizer",value:"adam"},{name:"init_learning_rate",value:"1e-3"},{name:"lr_decay_start",value:"0"},{name:"lr_decay_every",value:"1000"},{name:"lr_decay_rate",value:"0.9"},{name:"skip-target",value:"0.4"},{name:"skip-weight",value:"0.8"},{name:"l2_reg",value:"0"},{name:"entropy_weight",value:"1e-4"},{name:"baseline_decay",value:"0.9999"}],numLayers:"8",inputSize:["32","32","3"],outputSize:["10"],operations:[{operationType:"convolution",parameters:[{name:"filter_size",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"3"},{value:"5"},{value:"7"}]},{name:"num_filter",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"32"},{value:"48"},{value:"64"},{value:"96"},{value:"128"}]},{name:"stride",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"1"},{value:"2"}]}]},{operationType:"separable_convolution",parameters:[{name:"filter_size",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"3"},{value:"5"},{value:"7"}]},{name:"num_filter",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"32"},{value:"48"},{value:"64"},{value:"96"},{value:"128"}]},{name:"stride",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"1"},{value:"2"}]},{name:"depth_multiplier",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"1"},{value:"2"}]}]},{operationType:"depthwise_convolution",parameters:[{name:"filter_size",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"3"},{value:"5"},{value:"7"}]},{name:"stride",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"1"},{value:"2"}]},{name:"depth_multiplier",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"1"},{value:"2"}]}]},{operationType:"reduction",parameters:[{name:"reduction_type",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"max_pooling"},{value:"avg_pooling"}]},{name:"pool_size",parameterType:"int",feasibleSpace:"feasibleSpace",min:"2",max:"3",step:"1",list:[]}]}],allParameterTypes:["int","double","categorical"],trial:"nasRLTrialTemplate.yaml",currentYaml:"",snackText:"",snackOpen:!1},Wn=function(e,a){return e.findIndex(function(e){return e.name===a})},Xn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qn,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"CHANGE_YAML_NAS":return Object(Gn.a)({},e,{currentYaml:a.payload});case"CHANGE_META_NAS":var t=e.commonParametersMetadata.slice(),n=Wn(t,a.name);return t[n].value=a.value,Object(Gn.a)({},e,{commonParametersMetadata:t});case"CHANGE_SPEC_NAS":var r=e.commonParametersSpec.slice();return r[n=Wn(r,a.name)].value=a.value,Object(Gn.a)({},e,{commonParametersSpec:r});case"CHANGE_OBJECTIVE_NAS":var l=e.objective.slice();return l[n=Wn(l,a.name)].value=a.value,Object(Gn.a)({},e,{objective:l});case"ADD_METRICS_NAS":var c=e.additionalMetricNames.slice();return c.push({value:""}),Object(Gn.a)({},e,{additionalMetricNames:c});case"DELETE_METRICS_NAS":return(c=e.additionalMetricNames.slice()).splice(a.index,1),Object(Gn.a)({},e,{additionalMetricNames:c});case"EDIT_METRICS_NAS":return(c=e.additionalMetricNames.slice())[a.index].value=a.value,Object(Gn.a)({},e,{additionalMetricNames:c});case"CHANGE_ALGORITHM_NAME_NAS":return Object(Gn.a)({},e,{algorithmName:a.algorithmName});case"ADD_ALGORITHM_SETTING_NAS":var i=e.algorithmSettings.slice();return i.push({name:"",value:""}),Object(Gn.a)({},e,{algorithmSettings:i});case"CHANGE_ALGORITHM_SETTING_NAS":return(i=e.algorithmSettings.slice())[a.index][a.field]=a.value,Object(Gn.a)({},e,{algorithmSettings:i});case"DELETE_ALGORITHM_SETTING_NAS":return(i=e.algorithmSettings.slice()).splice(a.index,1),Object(Gn.a)({},e,{algorithmSettings:i});case"EDIT_NUM_LAYERS":var o=a.value;return Object(Gn.a)({},e,{numLayers:o});case"ADD_SIZE":var m=e[a.sizeType].slice();return m.push("0"),Object(Gn.a)({},e,Object(Nn.a)({},a.sizeType,m));case"EDIT_SIZE":return(m=e[a.sizeType].slice())[a.index]=a.value,Object(Gn.a)({},e,Object(Nn.a)({},a.sizeType,m));case"DELETE_SIZE":return(m=e[a.sizeType].slice()).splice(a.index,1),Object(Gn.a)({},e,Object(Nn.a)({},a.sizeType,m));case"ADD_OPERATION":var s=e.operations.slice();return s.push({operationType:"",parameters:[]}),Object(Gn.a)({},e,{operations:s});case"DELETE_OPERATION":return(s=e.operations.slice()).splice(a.index,1),Object(Gn.a)({},e,{operations:s});case"CHANGE_OPERATION":return(s=e.operations.slice())[a.index].operationType=a.value,Object(Gn.a)({},e,{operations:s});case"ADD_PARAMETER_NAS":return(s=e.operations.slice())[a.opIndex].parameters.push({name:"",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[]}),Object(Gn.a)({},e,{operations:s});case"CHANGE_PARAMETER_NAS":return(s=e.operations.slice())[a.opIndex].parameters[a.paramIndex][a.field]=a.value,Object(Gn.a)({},e,{operations:s});case"DELETE_PARAMETER_NAS":return(s=e.operations.slice())[a.opIndex].parameters.splice(a.paramIndex,1),Object(Gn.a)({},e,{operations:s});case"ADD_LIST_PARAMETER_NAS":return(s=e.operations.slice())[a.opIndex].parameters[a.paramIndex].list.push({value:""}),Object(Gn.a)({},e,{operations:s});case"DELETE_LIST_PARAMETER_NAS":return(s=e.operations.slice())[a.opIndex].parameters[a.paramIndex].list.splice(a.listIndex,1),Object(Gn.a)({},e,{operations:s});case"EDIT_LIST_PARAMETER_NAS":return(s=e.operations.slice())[a.opIndex].parameters[a.paramIndex].list[a.listIndex].value=a.value,Object(Gn.a)({},e,{operations:s});case"CHANGE_TRIAL_NAS":return Object(Gn.a)({},e,{trial:a.trial});case"CLOSE_SNACKBAR":return Object(Gn.a)({},e,{snackOpen:!1});default:return e}},Vn={filter:"",filterType:{Created:!0,Running:!0,Restarting:!0,Succeeded:!0,Failed:!0},jobsList:[],filteredJobsList:[],loading:!1,steps:[]},Kn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vn,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"FILTER_JOBS":var t=e.jobsList.slice(),n=t.filter(function(e){return e.name.includes(a.filter)}),r=Object.assign({},e.filterType),l=Object.keys(r),c=l.filter(function(e){return r[e]}),i=n.filter(function(e){return c.includes(e.status)});return Object(Gn.a)({},e,{filteredJobsList:i,filter:a.filter});case"CHANGE_TYPE":var o=Object.assign({},e.filterType);o[a.filter]=a.checked;var m=Object.keys(o).filter(function(e){return o[e]}),s=e.jobsList.slice().filter(function(e){return m.includes(e.status)});return Object(Gn.a)({},e,{filterType:o,filteredJobsList:s});case"FETCH_NAS_JOBS_SUCCESS":return t=a.jobs,r=Object.assign({},e.filterType),l=Object.keys(r),c=l.filter(function(e){return r[e]}),i=t.filter(function(e){return c.includes(e.status)}),Object(Gn.a)({},e,{jobsList:a.jobs,filteredJobsList:i});case"FETCH_NAS_JOB_INFO_REQUEST":return Object(Gn.a)({},e,{loading:!0});case"FETCH_NAS_JOB_INFO_FAILURE":return Object(Gn.a)({},e,{loading:!1});case"FETCH_NAS_JOB_INFO_SUCCESS":return Object(Gn.a)({},e,{loading:!1,steps:a.steps});default:return e}},Zn={loading:!1,commonParametersMetadata:[{name:"Name",value:"random-experiment",description:"A name of an experiment"},{name:"Namespace",value:"kubeflow",description:"Namespace to deploy an experiment"}],commonParametersSpec:[{name:"ParallelTrialCount",value:"3",description:"How many trials can be processed in parallel"},{name:"MaxTrialCount",value:"12",description:"Max completed trials to mark experiment as succeeded"},{name:"MaxFailedTrialCount",value:"3",description:"Max failed trials to mark experiment as failed"}],objective:[{name:"Type",value:"maximize",description:"Type of optimization"},{name:"Goal",value:"0.99",description:"Goal of optimization"},{name:"ObjectiveMetricName",value:"Validation-accuracy",description:"Name for the objective metric"}],additionalMetricNames:[{value:"accuracy"}],algorithmName:"random",allAlgorithms:["grid","random","hyperband","bayesianoptimization"],algorithmSettings:[],parameters:[{name:"--lr",parameterType:"double",feasibleSpace:"feasibleSpace",min:"0.01",max:"0.03",list:[]},{name:"--num-layers",parameterType:"int",feasibleSpace:"feasibleSpace",min:"2",max:"5",list:[]},{name:"--optimizer",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",list:[{value:"sgd"},{value:"adam"},{value:"ftrl"}]}],allParameterTypes:["int","double","categorical"],trial:"cpuTrialTemplate.yaml",currentYaml:""},$n=function(e,a){return e.findIndex(function(e){return e.name===a})},qn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Zn,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"CHANGE_YAML_HP":return Object(Gn.a)({},e,{currentYaml:a.payload});case"CHANGE_META_HP":var t=e.commonParametersMetadata.slice(),n=$n(t,a.name);return t[n].value=a.value,Object(Gn.a)({},e,{commonParametersMetadata:t});case"CHANGE_SPEC_HP":var r=e.commonParametersSpec.slice();return r[n=$n(r,a.name)].value=a.value,Object(Gn.a)({},e,{commonParametersSpec:r});case"CHANGE_OBJECTIVE_HP":var l=e.objective.slice();return l[n=$n(l,a.name)].value=a.value,Object(Gn.a)({},e,{objective:l});case"ADD_METRICS_HP":var c=e.additionalMetricNames.slice();return c.push({value:""}),Object(Gn.a)({},e,{additionalMetricNames:c});case"DELETE_METRICS_HP":return(c=e.additionalMetricNames.slice()).splice(a.index,1),Object(Gn.a)({},e,{additionalMetricNames:c});case"EDIT_METRICS_HP":return(c=e.additionalMetricNames.slice())[a.index].value=a.value,Object(Gn.a)({},e,{additionalMetricNames:c});case"CHANGE_ALGORITHM_NAME_HP":return Object(Gn.a)({},e,{algorithmName:a.algorithmName});case"ADD_ALGORITHM_SETTING_HP":var i=e.algorithmSettings.slice();return i.push({name:"",value:""}),Object(Gn.a)({},e,{algorithmSettings:i});case"CHANGE_ALGORITHM_SETTING_HP":return(i=e.algorithmSettings.slice())[a.index][a.field]=a.value,Object(Gn.a)({},e,{algorithmSettings:i});case"DELETE_ALGORITHM_SETTING_HP":return(i=e.algorithmSettings.slice()).splice(a.index,1),Object(Gn.a)({},e,{algorithmSettings:i});case"CHANGE_PARAMETER_HP":var o=e.parameters.slice();return o.push({name:"",parameterType:"",feasibleSpace:"feasibleSpace",min:"",max:"",list:[]}),Object(Gn.a)({},e,{parameters:o});case"EDIT_PARAMTER_HP":return(o=e.parameters.slice())[a.index][a.field]=a.value,Object(Gn.a)({},e,{parameters:o});case"DELETE_PARAMETER_HP":return(o=e.parameters.slice()).splice(a.index,1),Object(Gn.a)({},e,{parameters:o});case"ADD_LIST_PARAMETER_HP":return(o=e.parameters.slice())[a.paramIndex].list.push({value:""}),Object(Gn.a)({},e,{parameters:o});case"EDIT_LIST_PARAMETER_HP":return(o=e.parameters.slice())[a.paramIndex].list[a.index].value=a.value,Object(Gn.a)({},e,{parameters:o});case"DELETE_LIST_PARAMETER_HP":return(o=e.parameters.slice())[a.paramIndex].list.splice(a.index,1),Object(Gn.a)({},e,{parameters:o});case"CHANGE_TRIAL_HP":return Object(Gn.a)({},e,{trial:a.trial});default:return e}},er={menuOpen:!1,addOpen:!1,editOpen:!1,deleteOpen:!1,trialTemplates:[],collectorTemplates:[],newTemplateName:"",newTemplateYaml:"",currentTemplateIndex:"",edittedTemplate:{name:"",yaml:""},currentTemplateName:""},ar=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:er,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"CLOSE_DIALOG":return Object(Gn.a)({},e,{editOpen:!1,addOpen:!1,deleteOpen:!1});case"OPEN_DIALOG":switch(a.dialogType){case"delete":switch(a.templateType){case"trial":return Object(Gn.a)({},e,{deleteOpen:!0,currentTemplateIndex:a.index,currentTemplateName:e.trialTemplates[a.index].name});case"collector":return Object(Gn.a)({},e,{deleteOpen:!0,currentTemplateIndex:a.index,currentTemplateName:e.collectorTemplates[a.index].name});default:return Object(Gn.a)({},e)}case"edit":switch(a.templateType){case"trial":return Object(Gn.a)({},e,{editOpen:!0,currentTemplateIndex:a.index,edittedTemplate:e.trialTemplates[a.index]});case"collector":return Object(Gn.a)({},e,{editOpen:!0,currentTemplateIndex:a.index,edittedTemplate:e.collectorTemplates[a.index]});default:return Object(Gn.a)({},e)}case"add":return Object(Gn.a)({},e,{addOpen:!0});default:return e}case"CHANGE_TEMPLATE":var t=e.edittedTemplate;return t[a.field]=a.value,Object(Gn.a)({},e,{edittedTemplate:t});case"FETCH_TRIAL_TEMPLATES_SUCCESS":return Object(Gn.a)({},e,{trialTemplates:a.templates});case"FETCH_COLLECTOR_TEMPLATES_SUCCESS":return Object(Gn.a)({},e,{collectorTemplates:a.templates});case"ADD_TEMPLATE_SUCCESS":case"DELETE_TEMPLATE_SUCCESS":case"EDIT_TEMPLATE_SUCCESS":switch(a.templateType){case"trial":return Object(Gn.a)({},e,{addOpen:!1,deleteOpen:!1,editOpen:!1,trialTemplates:a.templates});case"collector":return Object(Gn.a)({},e,{addOpen:!1,deleteOpen:!1,editOpen:!1,collectorTemplates:a.templates});default:return Object(Gn.a)({},e)}case"ADD_TEMPLATE_FAILURE":case"EDIT_TEMPLATE_FAILURE":case"DELETE_TEMPLATE_FAILURE":return Object(Gn.a)({},e,{addOpen:!1,deleteOpen:!1,editOpen:!1});default:return e}},tr={filter:"",filterType:{Created:!0,Running:!0,Restarting:!0,Succeeded:!0,Failed:!0},jobsList:[],filteredJobsList:[],jobData:[],trialData:[],dialogOpen:!1,loading:!1},nr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tr,a=arguments.length>1?arguments[1]:void 0;switch(a.type){case"FILTER_JOBS":var t=e.jobsList.slice(),n=t.filter(function(e){return e.name.includes(a.filter)}),r=Object.assign({},e.filterType),l=Object.keys(r),c=l.filter(function(e){return r[e]}),i=n.filter(function(e){return c.includes(e.status)});return Object(Gn.a)({},e,{filteredJobsList:i,filter:a.filter});case"CHANGE_TYPE":var o=Object.assign({},e.filterType);o[a.filter]=a.checked;var m=Object.keys(o).filter(function(e){return o[e]}),s=e.jobsList.slice().filter(function(e){return m.includes(e.status)});return Object(Gn.a)({},e,{filterType:o,filteredJobsList:s});case"FETCH_HP_JOBS_SUCCESS":return t=a.jobs,r=Object.assign({},e.filterType),l=Object.keys(r),c=l.filter(function(e){return r[e]}),i=t.filter(function(e){return c.includes(e.status)}),Object(Gn.a)({},e,{jobsList:a.jobs,filteredJobsList:i});case"FETCH_HP_JOB_INFO_REQUEST":return Object(Gn.a)({},e,{loading:!0});case"FETCH_HP_JOB_INFO_SUCCESS":return Object(Gn.a)({},e,{jobData:a.jobData,loading:!1});case"FETCH_HP_JOB_INFO_FAILURE":return Object(Gn.a)({},e,{loading:!1});case"FETCH_HP_JOB_TRIAL_INFO_SUCCESS":return Object(Gn.a)({},e,{trialData:a.trialData,dialogOpen:!0});case"CLOSE_DIALOG":return Object(Gn.a)({},e,{dialogOpen:!1});default:return e}},rr=Object(Hn.c)((Dn={},Object(Nn.a)(Dn,"general",Yn),Object(Nn.a)(Dn,"template",ar),Object(Nn.a)(Dn,"hpCreate",qn),Object(Nn.a)(Dn,"hpMonitor",nr),Object(Nn.a)(Dn,"nasCreate",Xn),Object(Nn.a)(Dn,"nasMonitor",Kn),Dn));var lr=t(13),cr=t.n(lr),ir=t(6),or=t(61),mr=t.n(or),sr=cr.a.mark(Hr),ur=cr.a.mark(function e(){var a,t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("SUBMIT_YAML_REQUEST");case 3:return a=e.sent,e.prev=4,e.next=7,Object(ir.b)(pr,a.yaml);case 7:if(200!==(t=e.sent).status){e.next=13;break}return e.next=11,Object(ir.d)({type:"SUBMIT_YAML_SUCCESS"});case 11:e.next=15;break;case 13:return e.next=15,Object(ir.d)({type:"SUBMIT_YAML_FAILURE",message:t.message});case 15:e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(4),e.next=21,Object(ir.d)({type:"SUBMIT_YAML_FAILURE"});case 21:e.next=0;break;case 23:case"end":return e.stop()}},e,null,[[4,17]])}),pr=cr.a.mark(function e(a){var t,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t={yaml:a},e.next=4,Object(ir.b)(mr.a.post,"/katib/submit_yaml/",t);case 4:return n=e.sent,e.abrupt("return",n);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",{status:500,message:e.t0.response.data});case 11:case"end":return e.stop()}},e,null,[[0,8]])}),Er=cr.a.mark(function e(){var a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("DELETE_EXPERIMENT_REQUEST");case 3:return a=e.sent,e.prev=4,e.next=7,Object(ir.b)(dr,a.experimentName);case 7:if(200!==e.sent.status){e.next=13;break}return e.next=11,Object(ir.d)({type:"DELETE_EXPERIMENT_SUCCESS"});case 11:e.next=15;break;case 13:return e.next=15,Object(ir.d)({type:"DELETE_EXPERIMENT_FAILURE"});case 15:e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(4),e.next=21,Object(ir.d)({type:"DELETE_EXPERIMENT_FAILURE"});case 21:e.next=0;break;case 23:case"end":return e.stop()}},e,null,[[4,17]])}),dr=cr.a.mark(function e(a){var t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/delete_experiment/?experimentName=".concat(a));case 3:return t=e.sent,e.abrupt("return",t);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"DELETE_EXPERIMENT_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),br=cr.a.mark(function e(){var a,t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("SUBMIT_HP_JOB_REQUEST");case 3:return a=e.sent,e.prev=4,e.next=7,Object(ir.b)(fr,a.data);case 7:if(200!==(t=e.sent).status){e.next=13;break}return e.next=11,Object(ir.d)({type:"SUBMIT_HP_JOB_SUCCESS"});case 11:e.next=15;break;case 13:return e.next=15,Object(ir.d)({type:"SUBMIT_HP_JOB_FAILURE",message:t.message});case 15:e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(4),e.next=21,Object(ir.d)({type:"SUBMIT_HP_JOB_FAILURE"});case 21:e.next=0;break;case 23:case"end":return e.stop()}},e,null,[[4,17]])}),fr=cr.a.mark(function e(a){var t,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t={postData:a},e.next=4,Object(ir.b)(mr.a.post,"/katib/submit_hp_job/",t);case 4:return n=e.sent,e.abrupt("return",n);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",{status:500,message:e.t0.response.data});case 11:case"end":return e.stop()}},e,null,[[0,8]])}),gr=cr.a.mark(function e(){var a,t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_HP_JOBS_REQUEST");case 3:return e.sent,e.prev=4,e.next=7,Object(ir.b)(hr);case 7:if(200!==(a=e.sent).status){e.next=15;break}return(t=Object.assign(a.data,{})).map(function(e,a){Object.keys(e).forEach(function(a){var t=e[a];delete e[a],e[a.toLowerCase()]=t})}),e.next=13,Object(ir.d)({type:"FETCH_HP_JOBS_SUCCESS",jobs:t});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"FETCH_HP_JOBS_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"FETCH_HP_JOBS_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),hr=cr.a.mark(function e(){var a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_hp_jobs/");case 3:return a=e.sent,e.abrupt("return",a);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_HP_JOBS_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),vr=cr.a.mark(function e(){var a,t,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_HP_JOB_INFO_REQUEST");case 3:return a=e.sent,e.prev=4,e.next=7,Object(ir.b)(Tr,a.experimentName);case 7:if(200!==(t=e.sent).status){e.next=14;break}return n=t.data.split("\n").map(function(e,a){return e.split(",")}),e.next=12,Object(ir.d)({type:"FETCH_HP_JOB_INFO_SUCCESS",jobData:n});case 12:e.next=16;break;case 14:return e.next=16,Object(ir.d)({type:"FETCH_HP_JOB_INFO_FAILURE"});case 16:e.next=22;break;case 18:return e.prev=18,e.t0=e.catch(4),e.next=22,Object(ir.d)({type:"FETCH_HP_JOB_INFO_FAILURE"});case 22:e.next=0;break;case 24:case"end":return e.stop()}},e,null,[[4,18]])}),Tr=cr.a.mark(function e(a){var t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_hp_job_info/?experimentName=".concat(a));case 3:return t=e.sent,e.abrupt("return",t);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_HP_JOB_INFO_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),_r=cr.a.mark(function e(){var a,t,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_HP_JOB_TRIAL_INFO_REQUEST");case 3:return a=e.sent,e.prev=4,e.next=7,Object(ir.b)(Or,a.trialName);case 7:if(200!==(t=e.sent).status){e.next=14;break}return n=t.data.split("\n").map(function(e,a){return e.split(",")}),e.next=12,Object(ir.d)({type:"FETCH_HP_JOB_TRIAL_INFO_SUCCESS",trialData:n});case 12:e.next=16;break;case 14:return e.next=16,Object(ir.d)({type:"FETCH_HP_JOB_TRIAL_INFO_FAILURE"});case 16:e.next=22;break;case 18:return e.prev=18,e.t0=e.catch(4),e.next=22,Object(ir.d)({type:"FETCH_HP_JOB_TRIAL_INFO_FAILURE"});case 22:e.next=0;break;case 24:case"end":return e.stop()}},e,null,[[4,18]])}),Or=cr.a.mark(function e(a){var t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_hp_job_trial_info/?trialName=".concat(a));case 3:return t=e.sent,e.abrupt("return",t);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_HP_JOB_TRIAL_INFO_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),yr=cr.a.mark(function e(){var a,t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("SUBMIT_NAS_JOB_REQUEST");case 3:return a=e.sent,e.prev=4,e.next=7,Object(ir.b)(xr,a.data);case 7:if(200!==(t=e.sent).status){e.next=13;break}return e.next=11,Object(ir.d)({type:"SUBMIT_NAS_JOB_SUCCESS"});case 11:e.next=15;break;case 13:return e.next=15,Object(ir.d)({type:"SUBMIT_NAS_JOB_FAILURE",message:t.message});case 15:e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(4),e.next=21,Object(ir.d)({type:"SUBMIT_NAS_JOB_FAILURE"});case 21:e.next=0;break;case 23:case"end":return e.stop()}},e,null,[[4,17]])}),xr=cr.a.mark(function e(a){var t,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t={postData:a},e.next=4,Object(ir.b)(mr.a.post,"/katib/submit_nas_job/",t);case 4:return n=e.sent,e.abrupt("return",n);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",{status:500,message:e.t0.response.data});case 11:case"end":return e.stop()}},e,null,[[0,8]])}),Sr=cr.a.mark(function e(){var a,t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_NAS_JOBS_REQUEST");case 3:return e.sent,e.prev=4,e.next=7,Object(ir.b)(Nr);case 7:if(200!==(a=e.sent).status){e.next=15;break}return(t=Object.assign(a.data,{})).map(function(e,a){Object.keys(e).forEach(function(a){var t=e[a];delete e[a],e[a.toLowerCase()]=t})}),e.next=13,Object(ir.d)({type:"FETCH_NAS_JOBS_SUCCESS",jobs:t});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"FETCH_NAS_JOBS_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"FETCH_NAS_JOBS_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),Nr=cr.a.mark(function e(){var a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_nas_jobs/");case 3:return a=e.sent,e.abrupt("return",a);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_NAS_JOBS_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),Ar=cr.a.mark(function e(){var a,t,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_NAS_JOB_INFO_REQUEST");case 3:return a=e.sent,e.prev=4,e.next=7,Object(ir.b)(jr,a.experimentName);case 7:if(200!==(t=e.sent).status){e.next=15;break}return(n=Object.assign(t.data,{})).map(function(e,a){Object.keys(e).forEach(function(a){var t=e[a];delete e[a],e[a.toLowerCase()]=t})}),e.next=13,Object(ir.d)({type:"FETCH_NAS_JOB_INFO_SUCCESS",steps:n});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"FETCH_NAS_JOB_INFO_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"FETCH_NAS_JOB_INFO_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),jr=cr.a.mark(function e(a){var t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_nas_job_info/?experimentName=".concat(a));case 3:return t=e.sent,e.abrupt("return",t);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_NAS_JOB_INFO_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),Cr=cr.a.mark(function e(){var a,t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_TRIAL_TEMPLATES_REQUEST");case 3:return e.sent,e.prev=4,e.next=7,Object(ir.b)(kr);case 7:if(200!==(a=e.sent).status){e.next=15;break}return(t=Object.assign(a.data,{})).map(function(e,a){Object.keys(e).forEach(function(a){var t=e[a];delete e[a],e[a.toLowerCase()]=t})}),e.next=13,Object(ir.d)({type:"FETCH_TRIAL_TEMPLATES_SUCCESS",templates:t});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"FETCH_TRIAL_TEMPLATES_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"FETCH_TRIAL_TEMPLATES_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),kr=cr.a.mark(function e(){var a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_trial_templates/");case 3:return a=e.sent,e.abrupt("return",a);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_TRIAL_TEMPLATES_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),Lr=cr.a.mark(function e(){var a,t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_COLLECTOR_TEMPLATES_REQUEST");case 3:return e.sent,e.prev=4,e.next=7,Object(ir.b)(Ir);case 7:if(200!==(a=e.sent).status){e.next=15;break}return(t=Object.assign(a.data,{})).map(function(e,a){Object.keys(e).forEach(function(a){var t=e[a];delete e[a],e[a.toLowerCase()]=t})}),e.next=13,Object(ir.d)({type:"FETCH_COLLECTOR_TEMPLATES_SUCCESS",templates:t});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"FETCH_COLLECTOR_TEMPLATES_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"FETCH_COLLECTOR_TEMPLATES_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),Ir=cr.a.mark(function e(){var a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_collector_templates/");case 3:return a=e.sent,e.abrupt("return",a);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_COLLECTOR_TEMPLATES_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),Mr=cr.a.mark(function e(){var a,t,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("ADD_TEMPLATE_REQUEST");case 3:return a=e.sent,e.prev=4,e.next=7,Object(ir.b)(Pr,a.name,a.yaml,a.kind,a.action);case 7:if(200!==(t=e.sent).status){e.next=15;break}return(n=Object.assign(t.data.Data,{})).map(function(e,a){Object.keys(e).forEach(function(a){var t=e[a];delete e[a],e[a.toLowerCase()]=t})}),e.next=13,Object(ir.d)({type:"ADD_TEMPLATE_SUCCESS",templates:n,templateType:t.data.TemplateType});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"ADD_TEMPLATE_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"ADD_TEMPLATE_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),Pr=cr.a.mark(function e(a,t,n,r){var l,c;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,l={name:a,yaml:t,kind:n,action:r},e.next=4,Object(ir.b)(mr.a.post,"/katib/update_template/",l);case 4:return c=e.sent,e.abrupt("return",c);case 8:return e.prev=8,e.t0=e.catch(0),e.next=12,Object(ir.d)({type:"ADD_TEMPLATE_FAILURE"});case 12:case"end":return e.stop()}},e,null,[[0,8]])}),Rr=cr.a.mark(function e(){var a,t,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("EDIT_TEMPLATE_REQUEST");case 3:return a=e.sent,e.prev=4,e.next=7,Object(ir.b)(Dr,a.name,a.yaml,a.kind,a.action);case 7:if(200!==(t=e.sent).status){e.next=15;break}return(n=Object.assign(t.data.Data,{})).map(function(e,a){Object.keys(e).forEach(function(a){var t=e[a];delete e[a],e[a.toLowerCase()]=t})}),e.next=13,Object(ir.d)({type:"EDIT_TEMPLATE_SUCCESS",templates:n,templateType:t.data.TemplateType});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"EDIT_TEMPLATE_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"EDIT_TEMPLATE_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),Dr=cr.a.mark(function e(a,t,n,r){var l,c;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,l={name:a,yaml:t,kind:n,action:r},e.next=4,Object(ir.b)(mr.a.post,"/katib/update_template/",l);case 4:return c=e.sent,e.abrupt("return",c);case 8:return e.prev=8,e.t0=e.catch(0),e.next=12,Object(ir.d)({type:"EDIT_TEMPLATE_FAILURE"});case 12:case"end":return e.stop()}},e,null,[[0,8]])}),Fr=cr.a.mark(function e(){var a,t,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("DELETE_TEMPLATE_REQUEST");case 3:return a=e.sent,e.prev=4,e.next=7,Object(ir.b)(wr,a.name,a.kind,a.action);case 7:if(200!==(t=e.sent).status){e.next=15;break}return(n=Object.assign(t.data.Data,{})).map(function(e,a){Object.keys(e).forEach(function(a){var t=e[a];delete e[a],e[a.toLowerCase()]=t})}),e.next=13,Object(ir.d)({type:"DELETE_TEMPLATE_SUCCESS",templates:n,templateType:t.data.TemplateType});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"DELETE_TEMPLATE_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"DELETE_TEMPLATE_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),wr=cr.a.mark(function e(a,t,n){var r,l;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r={name:a,kind:t,action:n},e.next=4,Object(ir.b)(mr.a.post,"/katib/update_template/",r);case 4:return l=e.sent,e.abrupt("return",l);case 8:return e.prev=8,e.t0=e.catch(0),e.next=12,Object(ir.d)({type:"DELETE_TEMPLATE_FAILURE"});case 12:case"end":return e.stop()}},e,null,[[0,8]])});function Hr(){return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ir.a)([Object(ir.c)(Cr),Object(ir.c)(Lr),Object(ir.c)(gr),Object(ir.c)(Sr),Object(ir.c)(Mr),Object(ir.c)(Rr),Object(ir.c)(Fr),Object(ir.c)(ur),Object(ir.c)(Er),Object(ir.c)(br),Object(ir.c)(yr),Object(ir.c)(vr),Object(ir.c)(_r),Object(ir.c)(Ar)]);case 2:case"end":return e.stop()}},sr)}var Ur=t(629),Br=function(e){var a=Object(Jn.b)(),t=Object(Hn.e)(rr,e,Object(Hn.d)(Object(Hn.a)(a,Bn.a)));return t.runSaga=a.run,t.close=function(){return t.dispatch(Jn.a)},t}();Br.runSaga(Hr);var Jr=Object(ja.createMuiTheme)({palette:{primary:{main:"#000"},secondary:{main:"#fff"}},colors:{created:"#2304bd",running:"#8b8ffb",restarting:"#1eb9af",succeeded:"#63f291",failed:"#f26363"},typography:{fontFamily:"open sans,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol"}});c.a.render(r.a.createElement(Z.a,{store:Br},r.a.createElement(Ur.a,{basename:"/"},r.a.createElement(ja.MuiThemeProvider,{theme:Jr},r.a.createElement(wn.a,null),r.a.createElement(Rn,null)))),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(function(e){e.unregister()})}},[[356,1,2]]]); \ No newline at end of file diff --git a/pkg/ui/v1alpha2/frontend/build/static/js/main.bf4e0f37.chunk.js b/pkg/ui/v1alpha2/frontend/build/static/js/main.bf4e0f37.chunk.js new file mode 100644 index 00000000000..3e65b904104 --- /dev/null +++ b/pkg/ui/v1alpha2/frontend/build/static/js/main.bf4e0f37.chunk.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{279:function(e,t){},280:function(e,t){},356:function(e,t,a){e.exports=a(625)},600:function(e,t){},625:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),l=a(50),c=a.n(l),i=a(20),o=a.n(i),m=a(159),s=a.n(m),u=a(160),p=a.n(u),E=a(12),d=a.n(E),b=a(40),f=a.n(b),g=a(290),h=a.n(g),v=a(627),T=a(220),_=a(158),O=a.n(_),y=a(75),x=a.n(y),S=a(76),N=a.n(S),A=a(51),j=a.n(A),C=a(52),k=a.n(C),L=a(53),I=a.n(L),M=a(116),P=a.n(M),R=a(287),D=a.n(R),F=a(216),w=a.n(F),H=a(217),U=a.n(H),B=a(288),J=a.n(B),G=a(218),z=a.n(G),Y=a(215),Q=a.n(Y),W=a(104),X=a.n(W),V=a(289),K=a.n(V),Z=a(11),$=function(e){return{type:"TOGGLE_MENU",state:e}},q=function(e){return{type:"SUBMIT_YAML_REQUEST",yaml:e}},ee=function(e){return{type:"OPEN_DELETE_EXPERIMENT_DIALOG",experimentName:e}},te=o()({list:{width:250},nested:{paddingLeft:40}}),ae=Object(Z.b)(function(e){return{menuOpen:e.general.menuOpen}},{toggleMenu:$})(function(e){var t=r.a.useState(!1),a=Object(T.a)(t,2),n=a[0],l=a[1],c=r.a.useState(!1),i=Object(T.a)(c,2),o=i[0],m=i[1],s=te(),u="primary";return r.a.createElement("div",null,r.a.createElement(O.a,{open:e.menuOpen,onClose:function(){e.toggleMenu(!1)}},r.a.createElement(x.a,null,r.a.createElement(j.a,{button:!0,onClick:function(){l(!n)}},r.a.createElement(k.a,null,r.a.createElement(D.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"HP")),n?r.a.createElement(Q.a,null):r.a.createElement(X.a,null)),r.a.createElement(P.a,{in:n,timeout:"auto",unmountOnExit:!0},r.a.createElement(x.a,{component:"div",disablePadding:!0},r.a.createElement(j.a,{button:!0,className:s.nested,component:v.a,to:"/katib/hp"},r.a.createElement(k.a,null,r.a.createElement(w.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"Submit"))),r.a.createElement(j.a,{button:!0,className:s.nested,component:v.a,to:"/katib/hp_monitor"},r.a.createElement(k.a,null,r.a.createElement(U.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"Monitor"))))),r.a.createElement(N.a,null),r.a.createElement(j.a,{button:!0,onClick:function(){m(!o)}},r.a.createElement(k.a,null,r.a.createElement(J.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"NAS")),n?r.a.createElement(Q.a,null):r.a.createElement(X.a,null)),r.a.createElement(P.a,{in:o,timeout:"auto",unmountOnExit:!0},r.a.createElement(x.a,{component:"div",disablePadding:!0},r.a.createElement(j.a,{button:!0,className:s.nested,component:v.a,to:"/katib/nas"},r.a.createElement(k.a,null,r.a.createElement(w.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"Submit"))),r.a.createElement(j.a,{button:!0,className:s.nested,component:v.a,to:"/katib/nas_monitor"},r.a.createElement(k.a,null,r.a.createElement(U.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"Monitor"))))),r.a.createElement(N.a,null),r.a.createElement(j.a,{button:!0,component:v.a,to:"/katib/trial"},r.a.createElement(k.a,null,r.a.createElement(z.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"Trial Manifests"))),r.a.createElement(N.a,null),r.a.createElement(j.a,{button:!0,component:v.a,to:"/katib/collector"},r.a.createElement(k.a,null,r.a.createElement(z.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"Metrics Collector Manifests"))),r.a.createElement(N.a,null),r.a.createElement(j.a,{button:!0,component:v.a,to:"/katib/about"},r.a.createElement(k.a,null,r.a.createElement(K.a,{color:"primary"})),r.a.createElement(I.a,null,r.a.createElement(d.a,{variant:"title",color:u},"About"))))))}),ne=o()({root:{flexGrow:1},grow:{flexGrow:1},menuButton:{marginLeft:-12,marginRight:20},link:{textDecoration:"none"}}),re=Object(Z.b)(null,{toggleMenu:$})(function(e){var t=ne();return r.a.createElement("div",{className:t.root},r.a.createElement(s.a,{position:"static",color:"primary"},r.a.createElement(p.a,null,r.a.createElement(f.a,{className:t.menuButton,color:"inherit","aria-label":"Menu",onClick:function(t){e.toggleMenu(!0)}},r.a.createElement(h.a,null)),r.a.createElement(d.a,{variant:"headline",color:"secondary",component:v.a,to:"/",classes:t.link},"Katib")),r.a.createElement(ae,null)))}),le=a(161),ce=a.n(le),ie=a(291),oe=a.n(ie),me=o()({root:{flexGrow:1,marginTop:40},close:{padding:4}}),se=Object(Z.b)(function(e){return{snackText:e.general.snackText,snackOpen:e.general.snackOpen}},{closeSnackbar:function(){return{type:"CLOSE_SNACKBAR"}}})(function(e){var t=me();return r.a.createElement(ce.a,{anchorOrigin:{vertical:"top",horizontal:"center"},open:e.snackOpen,autoHideDuration:600,onClose:e.handleClose,ContentProps:{"aria-describedby":"message-id"},message:r.a.createElement("span",{id:"message-id"},e.snackText),action:[r.a.createElement(f.a,{key:"close","aria-label":"Close",color:"inherit",className:t.close,onClick:e.closeSnackbar},r.a.createElement(oe.a,null))]})}),ue=a(124),pe=a(630),Ee=a(62),de=a.n(Ee),be=a(5),fe=a.n(be),ge=Object(ue.a)({root:{margin:"0 auto",marginTop:50,flexGrow:1,width:"50%",height:400,textAlign:"center"},item:{padding:"40px !important"},block:{backgroundColor:"#4e4e4e",height:"100%",width:"100%",padding:40,"&:hover":{backgroundColor:"black"}}}),he=function(e){var t=ge();return r.a.createElement(de.a,{elevation:4,className:t.root},r.a.createElement(d.a,{variant:"h4"},"Welcome to Katib"),r.a.createElement(d.a,{variant:"h6"},"Choose type of experiment"),r.a.createElement("br",null),r.a.createElement(fe.a,{container:!0,spacing:40,alignContent:"center"},r.a.createElement(fe.a,{item:!0,xs:6,className:t.item,component:v.a,to:"/katib/hp/"},r.a.createElement(de.a,{className:t.block},r.a.createElement(d.a,{variant:"h6",color:"secondary"},"Hyperparameter Tuning"))),r.a.createElement(fe.a,{item:!0,xs:6,className:t.item,component:v.a,to:"/katib/nas/"},r.a.createElement(de.a,{className:t.block},r.a.createElement(d.a,{variant:"h6",color:"secondary"},"Neural Architecture Search")))),r.a.createElement("br",null),r.a.createElement(d.a,{variant:"h6"},"For additional information on Kubeflow visit ",r.a.createElement("a",{href:"https://kubeflow.org",target:"_blank",className:t.link},"website")),r.a.createElement(d.a,{variant:"h6"},"For additional information on Katib visit ",r.a.createElement("a",{href:"https://github.com/kubeflow/katib/",target:"_blank",className:t.link},"github")))},ve=a(628),Te=(a(250),a(251),a(252),a(125)),_e=a.n(Te),Oe=a(16),ye=a.n(Oe),xe=o()({root:{flexGrow:1},editor:{margin:"0 auto"},submit:{textAlign:"center",marginTop:10},progress:{height:10,margin:10},close:{padding:4}}),Se=Object(Z.b)(function(e){return{yaml:e.hpCreate.currentYaml}},{changeYaml:function(e){return{type:"CHANGE_YAML_HP",payload:e}},submitYaml:q})(function(e){var t=xe();return r.a.createElement("div",{className:t.root},r.a.createElement("h1",null,"Generate"),r.a.createElement("hr",null),r.a.createElement("div",{className:t.editor},r.a.createElement(_e.a,{mode:"text",theme:"tomorrow",value:e.yaml,onChange:function(t){e.changeYaml(t)},name:"yaml-editor",editorProps:{$blockScrolling:!0},tabSize:2,enableLiveAutocompletion:!0,fontSize:14,width:"100%",height:700})),r.a.createElement("div",{className:t.submit},r.a.createElement(ye.a,{variant:"contained",color:"primary",className:t.button,onClick:function(){e.submitYaml(e.yaml)}},"Deploy")))}),Ne=a(49),Ae=a.n(Ne),je=a(31),Ce=a.n(je),ke=a(39),Le=a.n(ke),Ie=a(18),Me=a.n(Ie),Pe=o()({textField:{marginLeft:4,marginRight:4,width:"100%"},help:{padding:2,verticalAlign:"middle",marginRight:5},parameter:{padding:2,marginBottom:10}}),Re=Object(Z.b)(function(e){return{commonParametersMetadata:e.hpCreate.commonParametersMetadata}},{changeMeta:function(e,t){return{type:"CHANGE_META_HP",name:e,value:t}}})(function(e){var t=Pe(),a=function(t){return function(a){e.changeMeta(t,a.target.value)}};return r.a.createElement("div",null,e.commonParametersMetadata.map(function(e,n){return r.a.createElement("div",{key:n,className:t.parameter},r.a.createElement(fe.a,{container:!0,alignItems:"center"},r.a.createElement(fe.a,{item:!0,xs:12,sm:3},r.a.createElement(d.a,{variant:"subheading"},r.a.createElement(Ce.a,{title:e.description},r.a.createElement(Le.a,{className:t.help,color:"primary"})),e.name)),r.a.createElement(fe.a,{item:!0,xs:12,sm:8},r.a.createElement(Me.a,{className:t.textField,value:e.value,onChange:a(e.name)}))))}))}),De=o()({textField:{marginLeft:4,marginRight:4,width:"100%"},help:{padding:2,verticalAlign:"middle",marginRight:5},parameter:{padding:2,marginBottom:10}}),Fe=Object(Z.b)(function(e){return{commonParametersSpec:e.hpCreate.commonParametersSpec}},{changeSpec:function(e,t){return{type:"CHANGE_SPEC_HP",name:e,value:t}}})(function(e){var t=De();return r.a.createElement("div",null,e.commonParametersSpec.map(function(a,n){return r.a.createElement("div",{key:n,className:t.parameter},r.a.createElement(fe.a,{container:!0,alignItems:"center"},r.a.createElement(fe.a,{item:!0,xs:12,sm:3},r.a.createElement(d.a,{variant:"subheading"},r.a.createElement(Ce.a,{title:a.description},r.a.createElement(Le.a,{className:t.help,color:"primary"})),a.name)),r.a.createElement(fe.a,{item:!0,xs:12,sm:8},r.a.createElement(Me.a,{className:t.textField,value:a.value,onChange:(l=a.name,function(t){e.changeSpec(l,t.target.value)})}))));var l}))}),we=a(45),He=a.n(we),Ue=a(71),Be=a.n(Ue),Je=a(83),Ge=a.n(Je),ze=o()({textField:{marginLeft:4,marginRight:4,width:"100%"},help:{padding:2,verticalAlign:"middle",marginRight:5},parameter:{padding:2,marginBottom:10}}),Ye=Object(Z.b)(function(e){return{objective:e.hpCreate.objective,additionalMetricNames:e.hpCreate.additionalMetricNames}},{changeObjective:function(e,t){return{type:"CHANGE_OBJECTIVE_HP",name:e,value:t}},addMetrics:function(){return{type:"ADD_METRICS_HP"}},editMetrics:function(e,t){return{type:"EDIT_METRICS_HP",index:e,value:t}},deleteMetrics:function(e){return{type:"DELETE_METRICS_HP",index:e}}})(function(e){var t=ze(),a=function(t){return function(a){e.deleteMetrics(t)}};return r.a.createElement("div",null,e.objective.map(function(a,n){return r.a.createElement("div",{key:n,className:t.parameter},r.a.createElement(fe.a,{container:!0,alignItems:"center"},r.a.createElement(fe.a,{item:!0,xs:12,sm:3},r.a.createElement(d.a,{variant:"subheading"},r.a.createElement(Ce.a,{title:a.description},r.a.createElement(Le.a,{className:t.help,color:"primary"})),a.name)),r.a.createElement(fe.a,{item:!0,xs:12,sm:8},r.a.createElement(Me.a,{className:t.textField,value:a.value,onChange:(l=a.name,function(t){e.changeObjective(l,t.target.value)})}))));var l}),r.a.createElement("div",{className:t.parameter},r.a.createElement(fe.a,{container:!0,alignItems:"center"},r.a.createElement(fe.a,{item:!0,xs:12,sm:3},r.a.createElement(d.a,{variant:"subheading"},r.a.createElement(Ce.a,{title:"Additional metrics that you want to collect"},r.a.createElement(Le.a,{className:t.help,color:"primary"})),"AdditionalMetricNames")),r.a.createElement(fe.a,{item:!0,xs:12,sm:8},e.additionalMetricNames.map(function(n,l){return r.a.createElement(fe.a,{container:!0},r.a.createElement(fe.a,{item:!0,xs:10},r.a.createElement(Me.a,{className:t.textField,value:n.value,onChange:(c=l,function(t){e.editMetrics(c,t.target.value)})})),r.a.createElement(fe.a,{item:!0,xs:2},r.a.createElement(f.a,{key:"close","aria-label":"Close",color:"primary",className:t.icon,onClick:a(l)},r.a.createElement(He.a,null))));var c})),r.a.createElement(fe.a,{item:!0,xs:12,sm:1},r.a.createElement(Be.a,{color:"primary",className:t.fab,onClick:e.addMetrics},r.a.createElement(Ge.a,null))))))}),Qe=a(34),We=a(35),Xe=a(37),Ve=a(36),Ke=a(38),Ze=a(56),$e=a.n(Ze),qe=a(57),et=a.n(qe),tt=a(63),at=a.n(tt),nt=a(58),rt=a.n(nt),lt=a(59),ct=a.n(lt),it=function(e){return{type:"CLOSE_DIALOG",dialogType:e}},ot=function(e){return{type:"OPEN_DIALOG",dialogType:e,index:arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,templateType:arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1}},mt=function(){return{type:"FETCH_TRIAL_TEMPLATES_REQUEST"}},st=function(e){function t(){var e,a;Object(Qe.a)(this,t);for(var n=arguments.length,r=new Array(n),l=0;l1)for(var n=e.jobData[0],l=e.jobData.slice(1),c=1;c1&&r.a.createElement(ua.a,{data:[{type:"parcoords",line:{color:"red"},dimensions:a}],layout:{width:1e3,height:600}}))}),da=a(162),ba=a.n(da),fa=a(164),ga=a.n(fa),ha=a(126),va=a.n(ha),Ta=a(163),_a=a.n(Ta),Oa=a(137),ya=a.n(Oa),xa=function(e){function t(){var e,a;Object(Qe.a)(this,t);for(var n=arguments.length,r=new Array(n),l=0;l1&&(a=this.props.jobData[0],n=this.props.jobData.slice(1)),r.a.createElement(de.a,{className:t.root},this.props.jobData.length>1&&r.a.createElement(ba.a,{className:t.table},r.a.createElement(_a.a,null,r.a.createElement(ya.a,null,a.map(function(e){return r.a.createElement(va.a,null,e)}))),r.a.createElement(ga.a,null,n.map(function(a,n){return r.a.createElement(ya.a,{key:n},a.map(function(a,n){return 0===n?r.a.createElement(va.a,{className:t.hover,component:"th",scope:"row",onClick:e.fetchAndOpenDialog(a),key:n},a):r.a.createElement(va.a,{align:"right"},a)}))}))))}}]),t}(r.a.Component),Sa=Object(Z.b)(function(e){return{jobData:e.hpMonitor.jobData}},{fetchHPJobTrialInfo:function(e){return{type:"FETCH_HP_JOB_TRIAL_INFO_REQUEST",trialName:e}}})(Object(jt.withStyles)(function(e){return{root:{width:"100%",marginTop:3*e.spacing.unit,overflowX:"auto"},table:{minWidth:700},hover:{"&:hover":{cursor:"pointer"}}}})(xa)),Na=Object(Z.b)(function(e){return{open:e.hpMonitor.dialogOpen,trialData:e.hpMonitor.trialData}},{closeDialog:function(){return{type:"CLOSE_DIALOG"}}})(Object(ue.b)(function(e){return{header:{textAlign:"center"}}})(function(e){var t=e.classes,a=[];if(0!==e.trialData.length){for(var n=e.trialData.slice(1),l={},c=0;c0&&void 0!==arguments[0]?arguments[0]:zn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_MENU":return Object(Gn.a)({},e,{menuOpen:t.state});case"CLOSE_SNACKBAR":return Object(Gn.a)({},e,{snackOpen:!1});case"SUBMIT_YAML_SUCCESS":return Object(Gn.a)({},e,{snackOpen:!0,snackText:"Successfully submitted"});case"SUBMIT_YAML_FAILURE":return Object(Gn.a)({},e,{snackOpen:!0,snackText:t.message});case"DELETE_EXPERIMENT_FAILURE":return Object(Gn.a)({},e,{deleteDialog:!1,snackOpen:!0,snackText:"Whoops, something went wrong"});case"DELETE_EXPERIMENT_SUCCESS":return Object(Gn.a)({},e,{deleteDialog:!1,snackOpen:!0,snackText:"Successfully deleted. Press Update button"});case"OPEN_DELETE_EXPERIMENT_DIALOG":return Object(Gn.a)({},e,{deleteDialog:!0,deleteExperimentName:t.experimentName});case"CLOSE_DELETE_EXPERIMENT_DIALOG":return Object(Gn.a)({},e,{deleteDialog:!1});case"SUBMIT_NAS_JOB_REQUEST":return Object(Gn.a)({},e,{loading:!0});case"SUBMIT_NAS_JOB_SUCCESS":return Object(Gn.a)({},e,{loading:!1,snackOpen:!0,snackText:"Successfully submitted"});case"SUBMIT_NAS_JOB_FAILURE":return Object(Gn.a)({},e,{loading:!1,snackOpen:!0,snackText:t.message});case"SUBMIT_HP_JOB_REQUEST":return Object(Gn.a)({},e,{loading:!0});case"SUBMIT_HP_JOB_SUCCESS":return Object(Gn.a)({},e,{loading:!1,snackOpen:!0,snackText:"Successfully submitted"});case"SUBMIT_HP_JOB_FAILURE":return Object(Gn.a)({},e,{loading:!1,snackOpen:!0,snackText:t.message});default:return e}},Qn={commonParametersMetadata:[{name:"Name",value:"nasrl-example",description:"A name of an experiment"},{name:"Namespace",value:"kubeflow",description:"Namespace to deploy an experiment"}],commonParametersSpec:[{name:"ParallelTrialCount",value:"3",description:"How many trials can be processed in parallel"},{name:"MaxTrialCount",value:"12",description:"Max completed trials to mark experiment as succeeded"},{name:"MaxFailedTrialCount",value:"3",description:"Max failed trials to mark experiment as failed"}],objective:[{name:"Type",value:"maximize",description:"Type of optimization"},{name:"Goal",value:"0.99",description:"Goal of optimization"},{name:"ObjectiveMetricName",value:"Validation-Accuracy",description:"Name for the objective metric"}],additionalMetricNames:[],algorithmName:"nasrl",allAlgorithms:["nasrl","nasenvelopenet"],algorithmSettings:[{name:"lstm_num_cells",value:"64"},{name:"lstm_num_layers",value:"1"},{name:"lstm_keep_prob",value:"1.0"},{name:"optimizer",value:"adam"},{name:"init_learning_rate",value:"1e-3"},{name:"lr_decay_start",value:"0"},{name:"lr_decay_every",value:"1000"},{name:"lr_decay_rate",value:"0.9"},{name:"skip-target",value:"0.4"},{name:"skip-weight",value:"0.8"},{name:"l2_reg",value:"0"},{name:"entropy_weight",value:"1e-4"},{name:"baseline_decay",value:"0.9999"}],numLayers:"8",inputSize:["32","32","3"],outputSize:["10"],operations:[{operationType:"convolution",parameters:[{name:"filter_size",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"3"},{value:"5"},{value:"7"}]},{name:"num_filter",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"32"},{value:"48"},{value:"64"},{value:"96"},{value:"128"}]},{name:"stride",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"1"},{value:"2"}]}]},{operationType:"separable_convolution",parameters:[{name:"filter_size",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"3"},{value:"5"},{value:"7"}]},{name:"num_filter",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"32"},{value:"48"},{value:"64"},{value:"96"},{value:"128"}]},{name:"stride",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"1"},{value:"2"}]},{name:"depth_multiplier",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"1"},{value:"2"}]}]},{operationType:"depthwise_convolution",parameters:[{name:"filter_size",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"3"},{value:"5"},{value:"7"}]},{name:"stride",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"1"},{value:"2"}]},{name:"depth_multiplier",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"1"},{value:"2"}]}]},{operationType:"reduction",parameters:[{name:"reduction_type",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[{value:"max_pooling"},{value:"avg_pooling"}]},{name:"pool_size",parameterType:"int",feasibleSpace:"feasibleSpace",min:"2",max:"3",step:"1",list:[]}]}],allParameterTypes:["int","double","categorical"],trial:"nasRLTrialTemplate.yaml",currentYaml:"",snackText:"",snackOpen:!1},Wn=function(e,t){return e.findIndex(function(e){return e.name===t})},Xn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CHANGE_YAML_NAS":return Object(Gn.a)({},e,{currentYaml:t.payload});case"CHANGE_META_NAS":var a=e.commonParametersMetadata.slice(),n=Wn(a,t.name);return a[n].value=t.value,Object(Gn.a)({},e,{commonParametersMetadata:a});case"CHANGE_SPEC_NAS":var r=e.commonParametersSpec.slice();return r[n=Wn(r,t.name)].value=t.value,Object(Gn.a)({},e,{commonParametersSpec:r});case"CHANGE_OBJECTIVE_NAS":var l=e.objective.slice();return l[n=Wn(l,t.name)].value=t.value,Object(Gn.a)({},e,{objective:l});case"ADD_METRICS_NAS":var c=e.additionalMetricNames.slice();return c.push({value:""}),Object(Gn.a)({},e,{additionalMetricNames:c});case"DELETE_METRICS_NAS":return(c=e.additionalMetricNames.slice()).splice(t.index,1),Object(Gn.a)({},e,{additionalMetricNames:c});case"EDIT_METRICS_NAS":return(c=e.additionalMetricNames.slice())[t.index].value=t.value,Object(Gn.a)({},e,{additionalMetricNames:c});case"CHANGE_ALGORITHM_NAME_NAS":return Object(Gn.a)({},e,{algorithmName:t.algorithmName});case"ADD_ALGORITHM_SETTING_NAS":var i=e.algorithmSettings.slice();return i.push({name:"",value:""}),Object(Gn.a)({},e,{algorithmSettings:i});case"CHANGE_ALGORITHM_SETTING_NAS":return(i=e.algorithmSettings.slice())[t.index][t.field]=t.value,Object(Gn.a)({},e,{algorithmSettings:i});case"DELETE_ALGORITHM_SETTING_NAS":return(i=e.algorithmSettings.slice()).splice(t.index,1),Object(Gn.a)({},e,{algorithmSettings:i});case"EDIT_NUM_LAYERS":var o=t.value;return Object(Gn.a)({},e,{numLayers:o});case"ADD_SIZE":var m=e[t.sizeType].slice();return m.push("0"),Object(Gn.a)({},e,Object(Nn.a)({},t.sizeType,m));case"EDIT_SIZE":return(m=e[t.sizeType].slice())[t.index]=t.value,Object(Gn.a)({},e,Object(Nn.a)({},t.sizeType,m));case"DELETE_SIZE":return(m=e[t.sizeType].slice()).splice(t.index,1),Object(Gn.a)({},e,Object(Nn.a)({},t.sizeType,m));case"ADD_OPERATION":var s=e.operations.slice();return s.push({operationType:"",parameters:[]}),Object(Gn.a)({},e,{operations:s});case"DELETE_OPERATION":return(s=e.operations.slice()).splice(t.index,1),Object(Gn.a)({},e,{operations:s});case"CHANGE_OPERATION":return(s=e.operations.slice())[t.index].operationType=t.value,Object(Gn.a)({},e,{operations:s});case"ADD_PARAMETER_NAS":return(s=e.operations.slice())[t.opIndex].parameters.push({name:"",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",step:"",list:[]}),Object(Gn.a)({},e,{operations:s});case"CHANGE_PARAMETER_NAS":return(s=e.operations.slice())[t.opIndex].parameters[t.paramIndex][t.field]=t.value,Object(Gn.a)({},e,{operations:s});case"DELETE_PARAMETER_NAS":return(s=e.operations.slice())[t.opIndex].parameters.splice(t.paramIndex,1),Object(Gn.a)({},e,{operations:s});case"ADD_LIST_PARAMETER_NAS":return(s=e.operations.slice())[t.opIndex].parameters[t.paramIndex].list.push({value:""}),Object(Gn.a)({},e,{operations:s});case"DELETE_LIST_PARAMETER_NAS":return(s=e.operations.slice())[t.opIndex].parameters[t.paramIndex].list.splice(t.listIndex,1),Object(Gn.a)({},e,{operations:s});case"EDIT_LIST_PARAMETER_NAS":return(s=e.operations.slice())[t.opIndex].parameters[t.paramIndex].list[t.listIndex].value=t.value,Object(Gn.a)({},e,{operations:s});case"CHANGE_TRIAL_NAS":return Object(Gn.a)({},e,{trial:t.trial});case"CLOSE_SNACKBAR":return Object(Gn.a)({},e,{snackOpen:!1});default:return e}},Vn={filter:"",filterType:{Created:!0,Running:!0,Restarting:!0,Succeeded:!0,Failed:!0},jobsList:[],filteredJobsList:[],loading:!1,steps:[]},Kn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FILTER_JOBS":var a=e.jobsList.slice(),n=a.filter(function(e){return e.name.includes(t.filter)}),r=Object.assign({},e.filterType),l=Object.keys(r),c=l.filter(function(e){return r[e]}),i=n.filter(function(e){return c.includes(e.status)});return Object(Gn.a)({},e,{filteredJobsList:i,filter:t.filter});case"CHANGE_TYPE":var o=Object.assign({},e.filterType);o[t.filter]=t.checked;var m=Object.keys(o).filter(function(e){return o[e]}),s=e.jobsList.slice().filter(function(e){return m.includes(e.status)});return Object(Gn.a)({},e,{filterType:o,filteredJobsList:s});case"FETCH_NAS_JOBS_SUCCESS":return a=t.jobs,r=Object.assign({},e.filterType),l=Object.keys(r),c=l.filter(function(e){return r[e]}),i=a.filter(function(e){return c.includes(e.status)}),Object(Gn.a)({},e,{jobsList:t.jobs,filteredJobsList:i});case"FETCH_NAS_JOB_INFO_REQUEST":return Object(Gn.a)({},e,{loading:!0});case"FETCH_NAS_JOB_INFO_FAILURE":return Object(Gn.a)({},e,{loading:!1});case"FETCH_NAS_JOB_INFO_SUCCESS":return Object(Gn.a)({},e,{loading:!1,steps:t.steps});default:return e}},Zn={loading:!1,commonParametersMetadata:[{name:"Name",value:"random-experiment",description:"A name of an experiment"},{name:"Namespace",value:"kubeflow",description:"Namespace to deploy an experiment"}],commonParametersSpec:[{name:"ParallelTrialCount",value:"3",description:"How many trials can be processed in parallel"},{name:"MaxTrialCount",value:"12",description:"Max completed trials to mark experiment as succeeded"},{name:"MaxFailedTrialCount",value:"3",description:"Max failed trials to mark experiment as failed"}],objective:[{name:"Type",value:"maximize",description:"Type of optimization"},{name:"Goal",value:"0.99",description:"Goal of optimization"},{name:"ObjectiveMetricName",value:"Validation-accuracy",description:"Name for the objective metric"}],additionalMetricNames:[{value:"accuracy"}],algorithmName:"random",allAlgorithms:["grid","random","hyperband","bayesianoptimization"],algorithmSettings:[],parameters:[{name:"--lr",parameterType:"double",feasibleSpace:"feasibleSpace",min:"0.01",max:"0.03",list:[]},{name:"--num-layers",parameterType:"int",feasibleSpace:"feasibleSpace",min:"2",max:"5",list:[]},{name:"--optimizer",parameterType:"categorical",feasibleSpace:"list",min:"",max:"",list:[{value:"sgd"},{value:"adam"},{value:"ftrl"}]}],allParameterTypes:["int","double","categorical"],trial:"cpuTrialTemplate.yaml",currentYaml:""},$n=function(e,t){return e.findIndex(function(e){return e.name===t})},qn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Zn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CHANGE_YAML_HP":return Object(Gn.a)({},e,{currentYaml:t.payload});case"CHANGE_META_HP":var a=e.commonParametersMetadata.slice(),n=$n(a,t.name);return a[n].value=t.value,Object(Gn.a)({},e,{commonParametersMetadata:a});case"CHANGE_SPEC_HP":var r=e.commonParametersSpec.slice();return r[n=$n(r,t.name)].value=t.value,Object(Gn.a)({},e,{commonParametersSpec:r});case"CHANGE_OBJECTIVE_HP":var l=e.objective.slice();return l[n=$n(l,t.name)].value=t.value,Object(Gn.a)({},e,{objective:l});case"ADD_METRICS_HP":var c=e.additionalMetricNames.slice();return c.push({value:""}),Object(Gn.a)({},e,{additionalMetricNames:c});case"DELETE_METRICS_HP":return(c=e.additionalMetricNames.slice()).splice(t.index,1),Object(Gn.a)({},e,{additionalMetricNames:c});case"EDIT_METRICS_HP":return(c=e.additionalMetricNames.slice())[t.index].value=t.value,Object(Gn.a)({},e,{additionalMetricNames:c});case"CHANGE_ALGORITHM_NAME_HP":return Object(Gn.a)({},e,{algorithmName:t.algorithmName});case"ADD_ALGORITHM_SETTING_HP":var i=e.algorithmSettings.slice();return i.push({name:"",value:""}),Object(Gn.a)({},e,{algorithmSettings:i});case"CHANGE_ALGORITHM_SETTING_HP":return(i=e.algorithmSettings.slice())[t.index][t.field]=t.value,Object(Gn.a)({},e,{algorithmSettings:i});case"DELETE_ALGORITHM_SETTING_HP":return(i=e.algorithmSettings.slice()).splice(t.index,1),Object(Gn.a)({},e,{algorithmSettings:i});case"CHANGE_PARAMETER_HP":var o=e.parameters.slice();return o.push({name:"",parameterType:"",feasibleSpace:"feasibleSpace",min:"",max:"",list:[]}),Object(Gn.a)({},e,{parameters:o});case"EDIT_PARAMTER_HP":return(o=e.parameters.slice())[t.index][t.field]=t.value,Object(Gn.a)({},e,{parameters:o});case"DELETE_PARAMETER_HP":return(o=e.parameters.slice()).splice(t.index,1),Object(Gn.a)({},e,{parameters:o});case"ADD_LIST_PARAMETER_HP":return(o=e.parameters.slice())[t.paramIndex].list.push({value:""}),Object(Gn.a)({},e,{parameters:o});case"EDIT_LIST_PARAMETER_HP":return(o=e.parameters.slice())[t.paramIndex].list[t.index].value=t.value,Object(Gn.a)({},e,{parameters:o});case"DELETE_LIST_PARAMETER_HP":return(o=e.parameters.slice())[t.paramIndex].list.splice(t.index,1),Object(Gn.a)({},e,{parameters:o});case"CHANGE_TRIAL_HP":return Object(Gn.a)({},e,{trial:t.trial});default:return e}},er={menuOpen:!1,addOpen:!1,editOpen:!1,deleteOpen:!1,trialTemplates:[],collectorTemplates:[],newTemplateName:"",newTemplateYaml:"",currentTemplateIndex:"",edittedTemplate:{name:"",yaml:""},currentTemplateName:""},tr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:er,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLOSE_DIALOG":return Object(Gn.a)({},e,{editOpen:!1,addOpen:!1,deleteOpen:!1});case"OPEN_DIALOG":switch(t.dialogType){case"delete":switch(t.templateType){case"trial":return Object(Gn.a)({},e,{deleteOpen:!0,currentTemplateIndex:t.index,currentTemplateName:e.trialTemplates[t.index].name});case"collector":return Object(Gn.a)({},e,{deleteOpen:!0,currentTemplateIndex:t.index,currentTemplateName:e.collectorTemplates[t.index].name});default:return Object(Gn.a)({},e)}case"edit":switch(t.templateType){case"trial":return Object(Gn.a)({},e,{editOpen:!0,currentTemplateIndex:t.index,edittedTemplate:e.trialTemplates[t.index]});case"collector":return Object(Gn.a)({},e,{editOpen:!0,currentTemplateIndex:t.index,edittedTemplate:e.collectorTemplates[t.index]});default:return Object(Gn.a)({},e)}case"add":return Object(Gn.a)({},e,{addOpen:!0});default:return e}case"CHANGE_TEMPLATE":var a=e.edittedTemplate;return a[t.field]=t.value,Object(Gn.a)({},e,{edittedTemplate:a});case"FETCH_TRIAL_TEMPLATES_SUCCESS":return Object(Gn.a)({},e,{trialTemplates:t.templates});case"FETCH_COLLECTOR_TEMPLATES_SUCCESS":return Object(Gn.a)({},e,{collectorTemplates:t.templates});case"ADD_TEMPLATE_SUCCESS":case"DELETE_TEMPLATE_SUCCESS":case"EDIT_TEMPLATE_SUCCESS":switch(t.templateType){case"trial":return Object(Gn.a)({},e,{addOpen:!1,deleteOpen:!1,editOpen:!1,trialTemplates:t.templates});case"collector":return Object(Gn.a)({},e,{addOpen:!1,deleteOpen:!1,editOpen:!1,collectorTemplates:t.templates});default:return Object(Gn.a)({},e)}case"ADD_TEMPLATE_FAILURE":case"EDIT_TEMPLATE_FAILURE":case"DELETE_TEMPLATE_FAILURE":return Object(Gn.a)({},e,{addOpen:!1,deleteOpen:!1,editOpen:!1});default:return e}},ar={filter:"",filterType:{Created:!0,Running:!0,Restarting:!0,Succeeded:!0,Failed:!0},jobsList:[],filteredJobsList:[],jobData:[],trialData:[],dialogOpen:!1,loading:!1},nr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ar,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FILTER_JOBS":var a=e.jobsList.slice(),n=a.filter(function(e){return e.name.includes(t.filter)}),r=Object.assign({},e.filterType),l=Object.keys(r),c=l.filter(function(e){return r[e]}),i=n.filter(function(e){return c.includes(e.status)});return Object(Gn.a)({},e,{filteredJobsList:i,filter:t.filter});case"CHANGE_TYPE":var o=Object.assign({},e.filterType);o[t.filter]=t.checked;var m=Object.keys(o).filter(function(e){return o[e]}),s=e.jobsList.slice().filter(function(e){return m.includes(e.status)});return Object(Gn.a)({},e,{filterType:o,filteredJobsList:s});case"FETCH_HP_JOBS_SUCCESS":return a=t.jobs,r=Object.assign({},e.filterType),l=Object.keys(r),c=l.filter(function(e){return r[e]}),i=a.filter(function(e){return c.includes(e.status)}),Object(Gn.a)({},e,{jobsList:t.jobs,filteredJobsList:i});case"FETCH_HP_JOB_INFO_REQUEST":return Object(Gn.a)({},e,{loading:!0});case"FETCH_HP_JOB_INFO_SUCCESS":return Object(Gn.a)({},e,{jobData:t.jobData,loading:!1});case"FETCH_HP_JOB_INFO_FAILURE":return Object(Gn.a)({},e,{loading:!1});case"FETCH_HP_JOB_TRIAL_INFO_SUCCESS":return Object(Gn.a)({},e,{trialData:t.trialData,dialogOpen:!0});case"CLOSE_DIALOG":return Object(Gn.a)({},e,{dialogOpen:!1});default:return e}},rr=Object(Hn.c)((Dn={},Object(Nn.a)(Dn,"general",Yn),Object(Nn.a)(Dn,"template",tr),Object(Nn.a)(Dn,"hpCreate",qn),Object(Nn.a)(Dn,"hpMonitor",nr),Object(Nn.a)(Dn,"nasCreate",Xn),Object(Nn.a)(Dn,"nasMonitor",Kn),Dn));var lr=a(13),cr=a.n(lr),ir=a(6),or=a(61),mr=a.n(or),sr=cr.a.mark(Hr),ur=cr.a.mark(function e(){var t,a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("SUBMIT_YAML_REQUEST");case 3:return t=e.sent,e.prev=4,e.next=7,Object(ir.b)(pr,t.yaml);case 7:if(200!==(a=e.sent).status){e.next=13;break}return e.next=11,Object(ir.d)({type:"SUBMIT_YAML_SUCCESS"});case 11:e.next=15;break;case 13:return e.next=15,Object(ir.d)({type:"SUBMIT_YAML_FAILURE",message:a.message});case 15:e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(4),e.next=21,Object(ir.d)({type:"SUBMIT_YAML_FAILURE"});case 21:e.next=0;break;case 23:case"end":return e.stop()}},e,null,[[4,17]])}),pr=cr.a.mark(function e(t){var a,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a={yaml:t},e.next=4,Object(ir.b)(mr.a.post,"/katib/submit_yaml/",a);case 4:return n=e.sent,e.abrupt("return",n);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",{status:500,message:e.t0.response.data});case 11:case"end":return e.stop()}},e,null,[[0,8]])}),Er=cr.a.mark(function e(){var t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("DELETE_EXPERIMENT_REQUEST");case 3:return t=e.sent,e.prev=4,e.next=7,Object(ir.b)(dr,t.experimentName);case 7:if(200!==e.sent.status){e.next=13;break}return e.next=11,Object(ir.d)({type:"DELETE_EXPERIMENT_SUCCESS"});case 11:e.next=15;break;case 13:return e.next=15,Object(ir.d)({type:"DELETE_EXPERIMENT_FAILURE"});case 15:e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(4),e.next=21,Object(ir.d)({type:"DELETE_EXPERIMENT_FAILURE"});case 21:e.next=0;break;case 23:case"end":return e.stop()}},e,null,[[4,17]])}),dr=cr.a.mark(function e(t){var a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/delete_experiment/?experimentName=".concat(t));case 3:return a=e.sent,e.abrupt("return",a);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"DELETE_EXPERIMENT_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),br=cr.a.mark(function e(){var t,a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("SUBMIT_HP_JOB_REQUEST");case 3:return t=e.sent,e.prev=4,e.next=7,Object(ir.b)(fr,t.data);case 7:if(200!==(a=e.sent).status){e.next=13;break}return e.next=11,Object(ir.d)({type:"SUBMIT_HP_JOB_SUCCESS"});case 11:e.next=15;break;case 13:return e.next=15,Object(ir.d)({type:"SUBMIT_HP_JOB_FAILURE",message:a.message});case 15:e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(4),e.next=21,Object(ir.d)({type:"SUBMIT_HP_JOB_FAILURE"});case 21:e.next=0;break;case 23:case"end":return e.stop()}},e,null,[[4,17]])}),fr=cr.a.mark(function e(t){var a,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a={postData:t},e.next=4,Object(ir.b)(mr.a.post,"/katib/submit_hp_job/",a);case 4:return n=e.sent,e.abrupt("return",n);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",{status:500,message:e.t0.response.data});case 11:case"end":return e.stop()}},e,null,[[0,8]])}),gr=cr.a.mark(function e(){var t,a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_HP_JOBS_REQUEST");case 3:return e.sent,e.prev=4,e.next=7,Object(ir.b)(hr);case 7:if(200!==(t=e.sent).status){e.next=15;break}return(a=Object.assign(t.data,{})).map(function(e,t){Object.keys(e).forEach(function(t){var a=e[t];delete e[t],e[t.toLowerCase()]=a})}),e.next=13,Object(ir.d)({type:"FETCH_HP_JOBS_SUCCESS",jobs:a});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"FETCH_HP_JOBS_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"FETCH_HP_JOBS_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),hr=cr.a.mark(function e(){var t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_hp_jobs/");case 3:return t=e.sent,e.abrupt("return",t);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_HP_JOBS_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),vr=cr.a.mark(function e(){var t,a,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_HP_JOB_INFO_REQUEST");case 3:return t=e.sent,e.prev=4,e.next=7,Object(ir.b)(Tr,t.experimentName);case 7:if(200!==(a=e.sent).status){e.next=14;break}return n=a.data.split("\n").map(function(e,t){return e.split(",")}),e.next=12,Object(ir.d)({type:"FETCH_HP_JOB_INFO_SUCCESS",jobData:n});case 12:e.next=16;break;case 14:return e.next=16,Object(ir.d)({type:"FETCH_HP_JOB_INFO_FAILURE"});case 16:e.next=22;break;case 18:return e.prev=18,e.t0=e.catch(4),e.next=22,Object(ir.d)({type:"FETCH_HP_JOB_INFO_FAILURE"});case 22:e.next=0;break;case 24:case"end":return e.stop()}},e,null,[[4,18]])}),Tr=cr.a.mark(function e(t){var a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_hp_job_info/?experimentName=".concat(t));case 3:return a=e.sent,e.abrupt("return",a);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_HP_JOB_INFO_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),_r=cr.a.mark(function e(){var t,a,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_HP_JOB_TRIAL_INFO_REQUEST");case 3:return t=e.sent,e.prev=4,e.next=7,Object(ir.b)(Or,t.trialName);case 7:if(200!==(a=e.sent).status){e.next=14;break}return n=a.data.split("\n").map(function(e,t){return e.split(",")}),e.next=12,Object(ir.d)({type:"FETCH_HP_JOB_TRIAL_INFO_SUCCESS",trialData:n});case 12:e.next=16;break;case 14:return e.next=16,Object(ir.d)({type:"FETCH_HP_JOB_TRIAL_INFO_FAILURE"});case 16:e.next=22;break;case 18:return e.prev=18,e.t0=e.catch(4),e.next=22,Object(ir.d)({type:"FETCH_HP_JOB_TRIAL_INFO_FAILURE"});case 22:e.next=0;break;case 24:case"end":return e.stop()}},e,null,[[4,18]])}),Or=cr.a.mark(function e(t){var a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_hp_job_trial_info/?trialName=".concat(t));case 3:return a=e.sent,e.abrupt("return",a);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_HP_JOB_TRIAL_INFO_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),yr=cr.a.mark(function e(){var t,a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("SUBMIT_NAS_JOB_REQUEST");case 3:return t=e.sent,e.prev=4,e.next=7,Object(ir.b)(xr,t.data);case 7:if(200!==(a=e.sent).status){e.next=13;break}return e.next=11,Object(ir.d)({type:"SUBMIT_NAS_JOB_SUCCESS"});case 11:e.next=15;break;case 13:return e.next=15,Object(ir.d)({type:"SUBMIT_NAS_JOB_FAILURE",message:a.message});case 15:e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(4),e.next=21,Object(ir.d)({type:"SUBMIT_NAS_JOB_FAILURE"});case 21:e.next=0;break;case 23:case"end":return e.stop()}},e,null,[[4,17]])}),xr=cr.a.mark(function e(t){var a,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a={postData:t},e.next=4,Object(ir.b)(mr.a.post,"/katib/submit_nas_job/",a);case 4:return n=e.sent,e.abrupt("return",n);case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",{status:500,message:e.t0.response.data});case 11:case"end":return e.stop()}},e,null,[[0,8]])}),Sr=cr.a.mark(function e(){var t,a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_NAS_JOBS_REQUEST");case 3:return e.sent,e.prev=4,e.next=7,Object(ir.b)(Nr);case 7:if(200!==(t=e.sent).status){e.next=15;break}return(a=Object.assign(t.data,{})).map(function(e,t){Object.keys(e).forEach(function(t){var a=e[t];delete e[t],e[t.toLowerCase()]=a})}),e.next=13,Object(ir.d)({type:"FETCH_NAS_JOBS_SUCCESS",jobs:a});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"FETCH_NAS_JOBS_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"FETCH_NAS_JOBS_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),Nr=cr.a.mark(function e(){var t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_nas_jobs/");case 3:return t=e.sent,e.abrupt("return",t);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_NAS_JOBS_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),Ar=cr.a.mark(function e(){var t,a,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_NAS_JOB_INFO_REQUEST");case 3:return t=e.sent,e.prev=4,e.next=7,Object(ir.b)(jr,t.experimentName);case 7:if(200!==(a=e.sent).status){e.next=15;break}return(n=Object.assign(a.data,{})).map(function(e,t){Object.keys(e).forEach(function(t){var a=e[t];delete e[t],e[t.toLowerCase()]=a})}),e.next=13,Object(ir.d)({type:"FETCH_NAS_JOB_INFO_SUCCESS",steps:n});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"FETCH_NAS_JOB_INFO_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"FETCH_NAS_JOB_INFO_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),jr=cr.a.mark(function e(t){var a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_nas_job_info/?experimentName=".concat(t));case 3:return a=e.sent,e.abrupt("return",a);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_NAS_JOB_INFO_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),Cr=cr.a.mark(function e(){var t,a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_TRIAL_TEMPLATES_REQUEST");case 3:return e.sent,e.prev=4,e.next=7,Object(ir.b)(kr);case 7:if(200!==(t=e.sent).status){e.next=15;break}return(a=Object.assign(t.data,{})).map(function(e,t){Object.keys(e).forEach(function(t){var a=e[t];delete e[t],e[t.toLowerCase()]=a})}),e.next=13,Object(ir.d)({type:"FETCH_TRIAL_TEMPLATES_SUCCESS",templates:a});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"FETCH_TRIAL_TEMPLATES_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"FETCH_TRIAL_TEMPLATES_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),kr=cr.a.mark(function e(){var t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_trial_templates/");case 3:return t=e.sent,e.abrupt("return",t);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_TRIAL_TEMPLATES_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),Lr=cr.a.mark(function e(){var t,a;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("FETCH_COLLECTOR_TEMPLATES_REQUEST");case 3:return e.sent,e.prev=4,e.next=7,Object(ir.b)(Ir);case 7:if(200!==(t=e.sent).status){e.next=15;break}return(a=Object.assign(t.data,{})).map(function(e,t){Object.keys(e).forEach(function(t){var a=e[t];delete e[t],e[t.toLowerCase()]=a})}),e.next=13,Object(ir.d)({type:"FETCH_COLLECTOR_TEMPLATES_SUCCESS",templates:a});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"FETCH_COLLECTOR_TEMPLATES_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"FETCH_COLLECTOR_TEMPLATES_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),Ir=cr.a.mark(function e(){var t;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ir.b)(mr.a.get,"/katib/fetch_collector_templates/");case 3:return t=e.sent,e.abrupt("return",t);case 7:return e.prev=7,e.t0=e.catch(0),e.next=11,Object(ir.d)({type:"FETCH_COLLECTOR_TEMPLATES_FAILURE"});case 11:case"end":return e.stop()}},e,null,[[0,7]])}),Mr=cr.a.mark(function e(){var t,a,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("ADD_TEMPLATE_REQUEST");case 3:return t=e.sent,e.prev=4,e.next=7,Object(ir.b)(Pr,t.name,t.yaml,t.kind,t.action);case 7:if(200!==(a=e.sent).status){e.next=15;break}return(n=Object.assign(a.data.Data,{})).map(function(e,t){Object.keys(e).forEach(function(t){var a=e[t];delete e[t],e[t.toLowerCase()]=a})}),e.next=13,Object(ir.d)({type:"ADD_TEMPLATE_SUCCESS",templates:n,templateType:a.data.TemplateType});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"ADD_TEMPLATE_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"ADD_TEMPLATE_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),Pr=cr.a.mark(function e(t,a,n,r){var l,c;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,l={name:t,yaml:a,kind:n,action:r},e.next=4,Object(ir.b)(mr.a.post,"/katib/update_template/",l);case 4:return c=e.sent,e.abrupt("return",c);case 8:return e.prev=8,e.t0=e.catch(0),e.next=12,Object(ir.d)({type:"ADD_TEMPLATE_FAILURE"});case 12:case"end":return e.stop()}},e,null,[[0,8]])}),Rr=cr.a.mark(function e(){var t,a,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("EDIT_TEMPLATE_REQUEST");case 3:return t=e.sent,e.prev=4,e.next=7,Object(ir.b)(Dr,t.name,t.yaml,t.kind,t.action);case 7:if(200!==(a=e.sent).status){e.next=15;break}return(n=Object.assign(a.data.Data,{})).map(function(e,t){Object.keys(e).forEach(function(t){var a=e[t];delete e[t],e[t.toLowerCase()]=a})}),e.next=13,Object(ir.d)({type:"EDIT_TEMPLATE_SUCCESS",templates:n,templateType:a.data.TemplateType});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"EDIT_TEMPLATE_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"EDIT_TEMPLATE_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),Dr=cr.a.mark(function e(t,a,n,r){var l,c;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,l={name:t,yaml:a,kind:n,action:r},e.next=4,Object(ir.b)(mr.a.post,"/katib/update_template/",l);case 4:return c=e.sent,e.abrupt("return",c);case 8:return e.prev=8,e.t0=e.catch(0),e.next=12,Object(ir.d)({type:"EDIT_TEMPLATE_FAILURE"});case 12:case"end":return e.stop()}},e,null,[[0,8]])}),Fr=cr.a.mark(function e(){var t,a,n;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Object(ir.e)("DELETE_TEMPLATE_REQUEST");case 3:return t=e.sent,e.prev=4,e.next=7,Object(ir.b)(wr,t.name,t.kind,t.action);case 7:if(200!==(a=e.sent).status){e.next=15;break}return(n=Object.assign(a.data.Data,{})).map(function(e,t){Object.keys(e).forEach(function(t){var a=e[t];delete e[t],e[t.toLowerCase()]=a})}),e.next=13,Object(ir.d)({type:"DELETE_TEMPLATE_SUCCESS",templates:n,templateType:a.data.TemplateType});case 13:e.next=17;break;case 15:return e.next=17,Object(ir.d)({type:"DELETE_TEMPLATE_FAILURE"});case 17:e.next=23;break;case 19:return e.prev=19,e.t0=e.catch(4),e.next=23,Object(ir.d)({type:"DELETE_TEMPLATE_FAILURE"});case 23:e.next=0;break;case 25:case"end":return e.stop()}},e,null,[[4,19]])}),wr=cr.a.mark(function e(t,a,n){var r,l;return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r={name:t,kind:a,action:n},e.next=4,Object(ir.b)(mr.a.post,"/katib/update_template/",r);case 4:return l=e.sent,e.abrupt("return",l);case 8:return e.prev=8,e.t0=e.catch(0),e.next=12,Object(ir.d)({type:"DELETE_TEMPLATE_FAILURE"});case 12:case"end":return e.stop()}},e,null,[[0,8]])});function Hr(){return cr.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ir.a)([Object(ir.c)(Cr),Object(ir.c)(Lr),Object(ir.c)(gr),Object(ir.c)(Sr),Object(ir.c)(Mr),Object(ir.c)(Rr),Object(ir.c)(Fr),Object(ir.c)(ur),Object(ir.c)(Er),Object(ir.c)(br),Object(ir.c)(yr),Object(ir.c)(vr),Object(ir.c)(_r),Object(ir.c)(Ar)]);case 2:case"end":return e.stop()}},sr)}var Ur=a(629),Br=function(e){var t=Object(Jn.b)(),a=Object(Hn.e)(rr,e,Object(Hn.d)(Object(Hn.a)(t,Bn.a)));return a.runSaga=t.run,a.close=function(){return a.dispatch(Jn.a)},a}();Br.runSaga(Hr);var Jr=Object(jt.createMuiTheme)({palette:{primary:{main:"#000"},secondary:{main:"#fff"}},colors:{created:"#2304bd",running:"#8b8ffb",restarting:"#1eb9af",succeeded:"#63f291",failed:"#f26363"},typography:{fontFamily:"open sans,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol"}});c.a.render(r.a.createElement(Z.a,{store:Br},r.a.createElement(Ur.a,{basename:"/"},r.a.createElement(jt.MuiThemeProvider,{theme:Jr},r.a.createElement(wn.a,null),r.a.createElement(Rn,null)))),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(function(e){e.unregister()})}},[[356,1,2]]]); \ No newline at end of file diff --git a/pkg/ui/v1alpha2/frontend/src/components/HP/Monitor/HPJobPlot.jsx b/pkg/ui/v1alpha2/frontend/src/components/HP/Monitor/HPJobPlot.jsx index d9d5a1aab98..d36b320958b 100644 --- a/pkg/ui/v1alpha2/frontend/src/components/HP/Monitor/HPJobPlot.jsx +++ b/pkg/ui/v1alpha2/frontend/src/components/HP/Monitor/HPJobPlot.jsx @@ -16,7 +16,7 @@ const HPJobPlot = (props) => { const classes = useStyles(); let dimensions = []; - if (props.jobData && props.jobData.length !== 0) { + if (props.jobData && props.jobData.length > 1) { // everything for the third column let header = props.jobData[0]; let data = props.jobData.slice(1); @@ -27,7 +27,7 @@ const HPJobPlot = (props) => { } let flag = "number"; let values = []; - for (let j = 0; j < data.length - 1; j++) { + for (let j = 0; j < data.length; j++) { let number = Number(data[j][i]) if (isNaN(number)) { flag = "string"; @@ -67,20 +67,22 @@ const HPJobPlot = (props) => { return (
- + {props.jobData.length > 1 && + + }
) } diff --git a/pkg/ui/v1alpha2/frontend/src/components/HP/Monitor/HPJobTable.jsx b/pkg/ui/v1alpha2/frontend/src/components/HP/Monitor/HPJobTable.jsx index 2b98e6f7014..28493d4ca03 100644 --- a/pkg/ui/v1alpha2/frontend/src/components/HP/Monitor/HPJobTable.jsx +++ b/pkg/ui/v1alpha2/frontend/src/components/HP/Monitor/HPJobTable.jsx @@ -39,40 +39,42 @@ class HPJobTable extends React.Component { let header = []; let data = []; - if (this.props.jobData && this.props.jobData.length !== 0) { + if (this.props.jobData && this.props.jobData.length > 1) { header = this.props.jobData[0]; data = this.props.jobData.slice(1) } return ( - - - - {header.map(header => ( - {header} - ))} - - - - {data.map((row, id) => ( - - {row.map((element, index) => { - if (index === 0) { - return ( - - {element} - - ) - } else { - return ( - {element} - ) - } - })} + {this.props.jobData.length > 1 && +
+ + + {header.map(header => ( + {header} + ))} - ))} - -
+ + + {data.map((row, id) => ( + + {row.map((element, index) => { + if (index === 0) { + return ( + + {element} + + ) + } else { + return ( + {element} + ) + } + })} + + ))} + + + }
); }