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

[Bug Fix - new ui] : Fix bug on list type hp #1704

Merged
merged 3 commits into from
Dec 1, 2021

Conversation

seong7
Copy link
Contributor

@seong7 seong7 commented Oct 7, 2021

What this PR does / why we need it:

This PR fixes a bug described below.

When user edits hyper parameters' type from 'int' or 'double' to 'Categorical' or 'Discrete' and save the values,
image

The page falls into infinite error loop.
image

This bug has been caused by this line in parameter.component.ts.

this.paramCtrl
    .get('feasibleSpace')
    .setValue(group.get('feasibleSpace').value);

The method setValue() of FormGroup throws when the new value is not exactly in the same structure of the existing FormControl.

This case, the existing Control has already been initialized as the structure below.
(This is the difference compared to 'adding a new param'. When adding, the error does not occur.)

{
  min: 1,
  max: 1, 
  step: ''
}

But the new value has a different structure as below.

{
  list: [ '111', '222' ]
}

To replace a Control in a FormGroup, we should use the method setControl() instead of setValue().

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Checklist:

  • Docs included if any changes are user facing

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: seong7
To complete the pull request process, please assign kimwnasptd after the PR has been reviewed.
You can assign the PR to them by writing /assign @kimwnasptd in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@aws-kf-ci-bot
Copy link
Contributor

Hi @seong7. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@anencore94
Copy link
Member

/ok-to-test

@gaocegege
Copy link
Member

Thanks for your contribution! 🎉 👍

/assign @andreyvelich

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Thank you for this fix @seong7!
/assign @kimwnasptd

pkg/new-ui/v1beta1/frontend/package-lock.json Outdated Show resolved Hide resolved
@kimwnasptd
Copy link
Member

The changes LTGM, also @seong7 very good job on describing the problem in the first message!

Could you only remove the changes in the package-lock.json file?

@google-oss-prow google-oss-prow bot added size/M and removed size/XXL labels Dec 1, 2021
@coveralls
Copy link

Coverage Status

Coverage increased (+1.6%) to 74.239% when pulling e5e3be3 on seong7:bugfix/list-type-hp into 983a867 on kubeflow:master.

@kimwnasptd
Copy link
Member

Everything looks good, thanks for the work @seong7 and apologies for the delay!

/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label Dec 1, 2021
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kimwnasptd, seong7

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 53baba8 into kubeflow:master Dec 1, 2021
@seong7 seong7 deleted the bugfix/list-type-hp branch December 21, 2021 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants