diff --git a/pkg/ui/v1beta1/frontend/src/components/HP/Create/Params/CommonSpec.jsx b/pkg/ui/v1beta1/frontend/src/components/HP/Create/Params/CommonSpec.jsx index 0de34d27154..f62c58dd0ef 100644 --- a/pkg/ui/v1beta1/frontend/src/components/HP/Create/Params/CommonSpec.jsx +++ b/pkg/ui/v1beta1/frontend/src/components/HP/Create/Params/CommonSpec.jsx @@ -7,6 +7,10 @@ import Tooltip from '@material-ui/core/Tooltip'; import HelpOutlineIcon from '@material-ui/icons/HelpOutline'; import Typography from '@material-ui/core/Typography'; import TextField from '@material-ui/core/TextField'; +import FormControl from '@material-ui/core/FormControl'; +import Select from '@material-ui/core/Select'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; import { changeSpec } from '../../../../actions/hpCreateActions'; @@ -27,6 +31,9 @@ const useStyles = makeStyles({ padding: 2, marginBottom: 10, }, + selectBox: { + width: 150, + }, }); const CommonParametersSpec = props => { @@ -39,7 +46,39 @@ const CommonParametersSpec = props => { return (
{props.commonParametersSpec.map((param, i) => { - return ( + return param.name === 'ResumePolicy' ? ( +
+ + + + + + + {param.name} + + + + + Resume Policy + + + + +
+ ) : (
@@ -68,6 +107,7 @@ const CommonParametersSpec = props => { const mapStateToProps = state => { return { commonParametersSpec: state[HP_CREATE_MODULE].commonParametersSpec, + allResumePolicyTypes: state[HP_CREATE_MODULE].allResumePolicyTypes, }; }; diff --git a/pkg/ui/v1beta1/frontend/src/components/NAS/Create/Params/CommonSpec.jsx b/pkg/ui/v1beta1/frontend/src/components/NAS/Create/Params/CommonSpec.jsx index 63df6511b66..42d393a0932 100644 --- a/pkg/ui/v1beta1/frontend/src/components/NAS/Create/Params/CommonSpec.jsx +++ b/pkg/ui/v1beta1/frontend/src/components/NAS/Create/Params/CommonSpec.jsx @@ -7,6 +7,10 @@ import Tooltip from '@material-ui/core/Tooltip'; import HelpOutlineIcon from '@material-ui/icons/HelpOutline'; import Typography from '@material-ui/core/Typography'; import TextField from '@material-ui/core/TextField'; +import FormControl from '@material-ui/core/FormControl'; +import Select from '@material-ui/core/Select'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; import { changeSpec } from '../../../../actions/nasCreateActions'; @@ -27,6 +31,9 @@ const useStyles = makeStyles({ padding: 2, marginBottom: 10, }, + selectBox: { + width: 150, + }, }); const CommonParametersSpec = props => { @@ -39,7 +46,39 @@ const CommonParametersSpec = props => { return (
{props.commonParametersSpec.map((param, i) => { - return ( + return param.name === 'ResumePolicy' ? ( +
+ + + + + + + {param.name} + + + + + Resume Policy + + + + +
+ ) : (
@@ -68,6 +107,7 @@ const CommonParametersSpec = props => { const mapStateToProps = state => { return { commonParametersSpec: state[NAS_CREATE_MODULE].commonParametersSpec, + allResumePolicyTypes: state[NAS_CREATE_MODULE].allResumePolicyTypes, }; }; diff --git a/pkg/ui/v1beta1/frontend/src/reducers/hpCreate.js b/pkg/ui/v1beta1/frontend/src/reducers/hpCreate.js index 6a3b287a1ea..ff658f2e452 100644 --- a/pkg/ui/v1beta1/frontend/src/reducers/hpCreate.js +++ b/pkg/ui/v1beta1/frontend/src/reducers/hpCreate.js @@ -7,31 +7,37 @@ const initialState = { { name: 'Name', value: 'random-experiment', - description: 'A name of an experiment', + description: 'A name of an Experiment', }, { name: 'Namespace', value: 'kubeflow', - description: 'Namespace to deploy an experiment', + description: 'Namespace to deploy an Experiment', }, ], commonParametersSpec: [ { name: 'ParallelTrialCount', value: '3', - description: 'How many trials can be processed in parallel', + description: 'How many Trials can be processed in parallel', }, { name: 'MaxTrialCount', value: '12', - description: 'Max completed trials to mark experiment as succeeded', + description: 'Max completed Trials to mark Experiment as succeeded', }, { name: 'MaxFailedTrialCount', value: '3', - description: 'Max failed trials to mark experiment as failed', + description: 'Max failed trials to mark Experiment as failed', + }, + { + name: 'ResumePolicy', + value: 'LongRunning', + description: 'Resume policy describes how the Experiment should be restarted', }, ], + allResumePolicyTypes: ['Never', 'LongRunning', 'FromVolume'], allObjectiveTypes: ['minimize', 'maximize'], objective: [ { @@ -56,7 +62,7 @@ const initialState = { }, ], algorithmName: 'random', - allAlgorithms: ['grid', 'random', 'hyperband', 'bayesianoptimization', 'tpe'], + allAlgorithms: ['grid', 'random', 'hyperband', 'bayesianoptimization', 'tpe', 'cmaes'], algorithmSettings: [], parameters: [ { diff --git a/pkg/ui/v1beta1/frontend/src/reducers/nasCreate.js b/pkg/ui/v1beta1/frontend/src/reducers/nasCreate.js index ef1f0db7658..78882c6fddf 100644 --- a/pkg/ui/v1beta1/frontend/src/reducers/nasCreate.js +++ b/pkg/ui/v1beta1/frontend/src/reducers/nasCreate.js @@ -6,31 +6,37 @@ const initialState = { { name: 'Name', value: 'enas-example', - description: 'A name of an experiment', + description: 'A name of an Experiment', }, { name: 'Namespace', value: 'kubeflow', - description: 'Namespace to deploy an experiment', + description: 'Namespace to deploy an Experiment', }, ], commonParametersSpec: [ { name: 'ParallelTrialCount', value: '3', - description: 'How many trials can be processed in parallel', + description: 'How many Trials can be processed in parallel', }, { name: 'MaxTrialCount', value: '12', - description: 'Max completed trials to mark experiment as succeeded', + description: 'Max completed Trials to mark Experiment as succeeded', }, { name: 'MaxFailedTrialCount', value: '3', - description: 'Max failed trials to mark experiment as failed', + description: 'Max failed Trials to mark Experiment as failed', + }, + { + name: 'ResumePolicy', + value: 'LongRunning', + description: 'Resume policy describes how the Experiment should be restarted', }, ], + allResumePolicyTypes: ['Never', 'LongRunning', 'FromVolume'], allObjectiveTypes: ['minimize', 'maximize'], objective: [ { @@ -51,7 +57,7 @@ const initialState = { ], additionalMetricNames: [], algorithmName: 'enas', - allAlgorithms: ['enas'], + allAlgorithms: ['enas', 'darts'], algorithmSettings: [ { name: 'controller_hidden_size',