diff --git a/cmd/ui/v1alpha3/main.go b/cmd/ui/v1alpha3/main.go index a063c111370..d299c6f40f6 100644 --- a/cmd/ui/v1alpha3/main.go +++ b/cmd/ui/v1alpha3/main.go @@ -3,10 +3,9 @@ package main import ( "flag" "fmt" + "log" "net/http" - "k8s.io/klog" - ui "github.com/kubeflow/katib/pkg/ui/v1alpha3" ) @@ -23,7 +22,7 @@ func main() { flag.Parse() kuh := ui.NewKatibUIHandler() - klog.Infof("Serving the frontend dir %s", *buildDir) + log.Printf("Serving the frontend dir %s", *buildDir) frontend := http.FileServer(http.Dir(*buildDir)) http.Handle("/katib/", http.StripPrefix("/katib/", frontend)) @@ -43,7 +42,7 @@ func main() { http.HandleFunc("/katib/fetch_trial_templates/", kuh.FetchTrialTemplates) http.HandleFunc("/katib/update_template/", kuh.AddEditDeleteTemplate) - klog.Infof("Serving at %s:%s", *host, *port) + log.Printf("Serving at %s:%s", *host, *port) if err := http.ListenAndServe(fmt.Sprintf("%s:%s", *host, *port), nil); err != nil { panic(err) } diff --git a/pkg/ui/v1alpha3/frontend/package.json b/pkg/ui/v1alpha3/frontend/package.json index 076bda7f4f8..db1467643af 100644 --- a/pkg/ui/v1alpha3/frontend/package.json +++ b/pkg/ui/v1alpha3/frontend/package.json @@ -128,8 +128,8 @@ "node" ], "watchPlugins": [ - "/home/akado2009/go/src/github.com/kubeflow/katib/pkg/ui/frontend/node_modules/jest-watch-typeahead/filename.js", - "/home/akado2009/go/src/github.com/kubeflow/katib/pkg/ui/frontend/node_modules/jest-watch-typeahead/testname.js" + "./node_modules/jest-watch-typeahead/filename.js", + "./node_modules/jest-watch-typeahead/testname.js" ] }, "babel": { diff --git a/pkg/ui/v1alpha3/frontend/scripts/start.js b/pkg/ui/v1alpha3/frontend/scripts/start.js index 99bb4ab3869..06bfbb12110 100644 --- a/pkg/ui/v1alpha3/frontend/scripts/start.js +++ b/pkg/ui/v1alpha3/frontend/scripts/start.js @@ -113,12 +113,13 @@ checkBrowsers(paths.appPath, isInteractive) if (isInteractive) { clearConsole(); } - console.log(chalk.cyan('Starting the development server...\n')); + console.log(chalk.cyan(`Starting the development server on ${HOST}:${port}...\n`)); openBrowser(urls.localUrlForBrowser); }); - ['SIGINT', 'SIGTERM'].forEach(function(sig) { + ['SIGINT', 'SIGTERM', 'SIGQUIT'].forEach(function(sig) { process.on(sig, function() { + console.log("Terminating"); devServer.close(); process.exit(); }); diff --git a/pkg/ui/v1alpha3/frontend/src/components/HP/Create/HPParameters.jsx b/pkg/ui/v1alpha3/frontend/src/components/HP/Create/HPParameters.jsx index 43d658359b8..efcb674eacc 100644 --- a/pkg/ui/v1alpha3/frontend/src/components/HP/Create/HPParameters.jsx +++ b/pkg/ui/v1alpha3/frontend/src/components/HP/Create/HPParameters.jsx @@ -62,7 +62,7 @@ const SectionInTypography = (name, classes) => { {name} -
+
@@ -86,7 +86,7 @@ const addAlgorithmSettings = (spec, destination) => { const addParameter = (source, destination) => { source.map((param, i) => { - let tempParam = {} + let tempParam = {} tempParam.name = param.name tempParam.parameterType = param.parameterType tempParam.feasibleSpace = {} @@ -95,6 +95,9 @@ const addParameter = (source, destination) => { } else { tempParam.feasibleSpace.min = param.min tempParam.feasibleSpace.max = param.max + if (param.step != "") { + tempParam.feasibleSpace.step = param.step + } } destination.push(tempParam) }) @@ -111,15 +114,15 @@ const HPParameters = (props) => { data.spec.objective = {} deCapitalizeFirstLetterAndAppend(props.objective, data.spec.objective) data.spec.objective.additionalMetricNames = props.additionalMetricNames.map((metrics, i) => metrics.value) - + data.spec.algorithm = {} data.spec.algorithm.algorithmName = props.algorithmName - data.spec.algorithm.algorithmSettings = [] + data.spec.algorithm.algorithmSettings = [] addAlgorithmSettings(props.algorithmSettings, data.spec.algorithm.algorithmSettings) - + data.spec.parameters = [] addParameter(props.parameters, data.spec.parameters) - + //TODO: Add support not only for default ConfigMap for Trial-Templates data.spec.trialTemplate = { goTemplate: { @@ -137,29 +140,29 @@ const HPParameters = (props) => { const { classes } = props; return ( -
- {/* Common Metadata */} - {SectionInTypography("Metadata", classes)} -
- - {SectionInTypography("Common Parameters", classes)} - - {SectionInTypography("Objective", classes)} - - {SectionInTypography("Algorithm", classes)} - - - {SectionInTypography("Parameters", classes)} - - {SectionInTypography("Trial Spec", classes)} - - -
- -
+ ) } diff --git a/pkg/ui/v1alpha3/frontend/src/components/HP/Create/Params/Parameters.jsx b/pkg/ui/v1alpha3/frontend/src/components/HP/Create/Params/Parameters.jsx index 88ef77a0135..1404729f3da 100644 --- a/pkg/ui/v1alpha3/frontend/src/components/HP/Create/Params/Parameters.jsx +++ b/pkg/ui/v1alpha3/frontend/src/components/HP/Create/Params/Parameters.jsx @@ -159,7 +159,7 @@ const Parameters = (props) => { })) } - {param.feasibleSpace === "feasibleSpace" && + {param.feasibleSpace === "feasibleSpace" &&
{ value={param.max} onChange={onGeneralEdit(i, "max")} /> -
+ {props.algorithmName === "grid" && param.parameterType === "double" && + + } + } @@ -208,6 +216,7 @@ const mapStateToProps = state => { return { parameters: state[module].parameters, allParameterTypes: state[module].allParameterTypes, + algorithmName: state[module].algorithmName } }