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

support tolerations for ContainerOps #1269

Merged
merged 5 commits into from
May 9, 2019

Conversation

hamedhsn
Copy link
Contributor

@hamedhsn hamedhsn commented May 1, 2019

fix #1265


This change is Reviewable

@k8s-ci-robot
Copy link
Contributor

Hi @hamedhsn. 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.

1 similar comment
@k8s-ci-robot
Copy link
Contributor

Hi @hamedhsn. 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.


Args:
volume: Kubernetes toleration
For detailed spec, check volume definition
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably need to rename volume to tolerations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -745,6 +746,17 @@ def add_volume(self, volume):
self.volumes.append(volume)
return self

def add_toleration(self, tolerations):
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a basic unit test to cover the method: calling the method and checking the output yaml contains the correct tolerations config? This will help us to make sure future changes won't break existing feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure will do.

Copy link
Contributor

Choose a reason for hiding this comment

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

You'll probably need to test the op_to_template method for this.

@hongye-sun
Copy link
Contributor

/ok-to-test

@@ -745,6 +746,17 @@ def add_volume(self, volume):
self.volumes.append(volume)
return self

def add_toleration(self, tolerations):
Copy link
Contributor

Choose a reason for hiding this comment

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

You should probably specify the type of tolerations

Copy link
Contributor

Choose a reason for hiding this comment

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

Right now it's not apparent to the user what kind of argument they need to pass here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@gaoning777 gaoning777 self-assigned this May 3, 2019
@gaoning777
Copy link
Contributor

Thanks for your contributions.
Please see the comments above and address them. I'll make sure the PR is merged once they are addressed.

@Ark-kun Ark-kun self-assigned this May 3, 2019
@googlebot
Copy link
Collaborator

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@hamedhsn hamedhsn force-pushed the add_tolerations branch from 8a2632f to ad36487 Compare May 5, 2019 23:18
@googlebot
Copy link
Collaborator

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@Ark-kun
Copy link
Contributor

Ark-kun commented May 6, 2019

As you probably see from the test failures, the golden compiled Argo YAML is wrong. At the very least it lacks the root DAG.

@hamedhsn
Copy link
Contributor Author

hamedhsn commented May 6, 2019

@Ark-kun hmm yeah saw that, is that the right way to test the function?

@Ark-kun
Copy link
Contributor

Ark-kun commented May 6, 2019

@Ark-kun hmm yeah saw that, is that the right way to test the function?

Maybe just call kfp.compiler.Compiler()._op_to_template(ContainerOp(...).add_toleration(bla)) and check the resulting dictionary for correct keys and values.

@hamedhsn hamedhsn force-pushed the add_tolerations branch from 5211cba to a90d5a5 Compare May 7, 2019 16:42
@hamedhsn
Copy link
Contributor Author

hamedhsn commented May 9, 2019

@Ark-kun sounds like tests are passes, can you review pls

@hamedhsn hamedhsn force-pushed the add_tolerations branch from a90d5a5 to a0b04b9 Compare May 9, 2019 18:07
@gaoning777
Copy link
Contributor

It looks good to me.
\lgtm
@Ark-kun I will let Alexey to send the approve once he thinks his concerns are addressed.

@hamedhsn thanks for quick turnaround.

@gaoning777
Copy link
Contributor

gaoning777 commented May 9, 2019

/lgtm

1 similar comment
@gaoning777
Copy link
Contributor

/lgtm

@Ark-kun
Copy link
Contributor

Ark-kun commented May 9, 2019

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Ark-kun

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

@k8s-ci-robot k8s-ci-robot merged commit ce60661 into kubeflow:master May 9, 2019
@hamedhsn
Copy link
Contributor Author

@Ark-kun @gaoning777 thanks guys :)

magdalenakuhn17 pushed a commit to magdalenakuhn17/pipelines that referenced this pull request Oct 22, 2023
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.

toleration support for ContainerOp
6 participants