-
Notifications
You must be signed in to change notification settings - Fork 444
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
Don't check if trial's metadata is in spec.parameters #1848
Conversation
…-check Don't check if trial's metadata in experiment parameters
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). For more information, open the CLA check for this pull request. |
Hi @alexeygorobets. 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 Once the patch is verified, the new status will be reflected by the 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. |
Thanks for creating this @alexeygorobets! |
hi @tenzen-y, just signed CLA, thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test
/retest |
1 similar comment
/retest |
Since
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great contribution @alexeygorobets !
I left a few comments.
// Check if parameter is trial metadata | ||
regex := regexp.MustCompile(consts.TrialTemplateMetaReplaceFormatRegex) | ||
match := regex.FindStringSubmatch(parameter.Reference) | ||
if !(len(match) > 0 && contains(consts.TrialTemplateMetaKeys, match[1])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think contains(consts.TrialTemplateMetaKeys, match[1])
returns false
when parameter.Reference
is Anotations
or Labels
.
WDYT @alexeygorobets ?
- name: trialLabelCustom | |
description: Trial's job label with custom value | |
reference: ${trialSpec.Labels[custom-key]} | |
- name: trialAnnotationCustom | |
description: Trial's job annotation with custom value | |
reference: ${trialSpec.Annotations[custom-key]} |
}(), | ||
Err: false, | ||
testDescription: "Trial template contains Trial metadata reference as parameter", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add a test case for Labels
or Annotations
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @tenzen-y , I've added handing of those cases and tests, thanks!
…ec-parameters Fix: Handle "Annotations" and "Labels" trial's metadata references
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating PR @alexeygorobets !
/lgtm
Could you please restart GitHub Actions @kubeflow/wg-automl-leads ?
Thanks @alexeygorobets for this PR /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexeygorobets, johnugeorge, tenzen-y 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 |
This PR fixes validation of Experiment when trial metadata used in template substitution.
Validator should not look for parameter in the spec.parameters if it is trial's metadata.
Which issue(s) this PR fixes:
Fixes #1844