Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI bug] Missing configuration fields in form #1443

Closed
3 tasks done
kimwnasptd opened this issue Feb 19, 2021 · 8 comments
Closed
3 tasks done

[UI bug] Missing configuration fields in form #1443

kimwnasptd opened this issue Feb 19, 2021 · 8 comments
Assignees
Labels

Comments

@kimwnasptd
Copy link
Member

kimwnasptd commented Feb 19, 2021

/kind bug

The new Katib UI's form for submitting Experiment CRs is missing the following fields, which are present in the current UI's form:

The most important one is the TrialParameters since without it the user cannot submit an Experiment by only using the form.

admission webhook "validating.experiment.katib.kubeflow.org" denied the request: spec.trialTemplate.trialParameters must be specified

/cc @andreyvelich

@kimwnasptd
Copy link
Member Author

I'll continue working on this now that the first iteration of our new UI #1421 is merged.

@andreyvelich @gaocegege @johnugeorge I see that the current UI has a way to automatically detect the Trial parameters. How exactly does this work? Does the UI parse the string content from the provided ConfigMaps and detects the ${trialParameters.<name>}?

Also @andreyvelich could you also add this issue to our Kanban board?

@kimwnasptd
Copy link
Member Author

/assign @kimwnasptd

@andreyvelich
Copy link
Member

I'll continue working on this now that the first iteration of our new UI #1421 is merged.

Thanks @kimwnasptd!

@andreyvelich @gaocegege @johnugeorge I see that the current UI has a way to automatically detect the Trial parameters. How exactly does this work? Does the UI parse the string content from the provided ConfigMaps and detects the ${trialParameters.<name>}?

Yes:

// getTrialParameters returns Trial parameters for the given YAML.
// It parses only Trial parameters names from the YAML.
const getTrialParameters = YAML => {
const templateParameterRegex = '\\{trialParameters\\..+?\\}';
let trialParameters = [];
let trialParameterNames = [];
let matchStr = [...YAML.matchAll(templateParameterRegex)];
matchStr.forEach(param => {
let newParameter = param[0].slice(param[0].indexOf('.') + 1, param[0].indexOf('}'));
if (!trialParameterNames.includes(newParameter)) {
trialParameterNames.push(newParameter);
trialParameters.push({
name: newParameter,
reference: '',
description: '',
});
}
});
return trialParameters;
};

It just parses parameters for the given YAML Trial template.

@kimwnasptd
Copy link
Member Author

ACK, I'll mimic this logic then.

Also, I was thinking about making the Reference field a dropdown list instead of a simple text input. My rationale was that if the field's value will be one of the hyper parameters then lets reduce the input required from the user and just list to them the available options.

My only question is if this holds for NAS Experiments. Looking at the docs I see they hint that the reference value of the trial params can be one of the hyper params, but it's not clear to me what's the case for NAS.
https://www.kubeflow.org/docs/components/katib/trial-template/#configure-trial-template-specification

Do you guys think I could make the reference input a dropdown instead or should we stick to basic text inputs?
Screenshot from 2021-03-09 00-15-49

@kimwnasptd
Copy link
Member Author

kimwnasptd commented Mar 8, 2021

Also I can confirm that I can create Experiments using the new UI's form, once it also sets the trialParameters form field.

So I'll move on to including the EarlyStopping and ResumePolicy settings, as mentioned in the beginning of the issue, which are the last missing ones for the new form to be on par with the current one.

I see that EarlyStopping

EarlyStopping *common.EarlyStoppingSpec `json:"earlyStopping,omitempty"`
accepts an arbitrary list of algorithm settings. Are these settings defined as finite list of values? Was thinking if it would make sense to pre-define these values like we do for the other algorithm settings

Values for algorithm settings

Screenshot from 2021-03-09 00-38-16

@andreyvelich
Copy link
Member

Also, I was thinking about making the Reference field a dropdown list instead of a simple text input. My rationale was that if the field's value will be one of the hyper parameters then lets reduce the input required from the user and just list to them the available options

I think it's great improvements for the HP experiment since almost every time reference is equal to one of the parameters.
We have only one case when reference is not equal to parameters right now, it is described here.
You check the example with metadata substitution here: https://github.com/kubeflow/katib/blob/master/examples/v1beta1/trial-metadata-substitution.yaml#L27-L48
I think we should discuss how we can provide user that functionality via submit page.

For NAS since "reference - the parameter name that experiment’s suggestion returns.", reference differs from parameters. For ENAS reference is equal to this: https://github.com/kubeflow/katib/blob/master/examples/v1beta1/nas/enas-example-cpu.yaml#L128-L133.
For DARTS reference is equal to this: https://github.com/kubeflow/katib/blob/master/examples/v1beta1/nas/darts-example-cpu.yaml#L45-L53.
We can setup some default parameter list for NAS experiment, I think.

WDYT @gaocegege @johnugeorge ?

@andreyvelich
Copy link
Member

Also I can confirm that I can create Experiments using the new UI's form, once it also sets the trialParameters form field.

So I'll move on to including the EarlyStopping and ResumePolicy settings, as mentioned in the beginning of the issue, which are the last missing ones for the new form to be on par with the current one.

I see that EarlyStopping accepts an arbitrary list of algorithm settings. Are these settings defined as finite list of values? Was thinking if it would make sense to pre-define these values like we do for the other algorithm settings
Screenshot from 2021-03-09 00-38-16

Thank you for your effort @kimwnasptd, it's great.
Yes, you can find Early Stopping algorithm settings here: https://www.kubeflow.org/docs/components/katib/early-stopping/#median-stopping-rule.

@kimwnasptd
Copy link
Member Author

closing this issue since #1463 has added the missing fields of the form.

The form is now on par with the current default UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants