-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Updated with scheduling capability for kfp.Client #2981
Conversation
Do I understand the failed test correctly when I assume that the failures are due to connectivity
? |
friendly ping @Ark-kun and @hongye-sun :) |
/test kubeflow-pipeline-e2e-test |
/test kubeflow-pipeline-sample-test |
/assign @hongye-sun |
/assign @Ark-kun |
/retest |
/test kubeflow-pipeline-sample-test |
/lgtm |
Thanks for the review @Ark-kun! |
/approve |
[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 |
/retest |
I haven't had the opportunity to try this yet, but from a quick glance it doesn't seem like this will support scheduling a specific version of a pipeline, right? I assume it should be possible to target a version like in the UI |
@parthmishra Yes and no it targets based on Pipeline Id, which is not the same as name. However you can get the id based upon the name. I usually target based upon the pipeline id I didn't actually knew about versioning. I do versioning based on Github SHA (hash) which i include in the name. I can check it out and might be able to update with a new PR. How do you use the versioning? |
@NikeNano I was talking about targeting a Pipeline Version resource. You could probably do it by creating an additional resource reference e.g.: if version_id:
pipline_yaml = client._pipelines_api.get_pipeline_version_template(version_id).template
pipeline_obj = yaml.safe_load(pipeline_yaml)
pipeline_json_string = json.loads(pipeline_obj)
version_ref = kfp_server_api.models.ApiResourceReference(
key=models.ApiResourceKey(
type=models.ApiResourceType.PIPELINE_VERSION,
id=version_id,
),
relationship=models.ApiRelationship.CREATOR,
) One thing to note would be that the pipeline version would need to exist and therefore supplying a package wouldn't make sense. Perhaps it might be a good idea to create separate methods similar to Edit: Also, I noticed that the trigger = kfp_server_api.models.ApiTrigger(
cron_schedule=api_cron_schedule.ApiCronSchedule(cron=cron_schedule),
periodic_schedule=periodic_schedule
) Does it work without it? |
I agree with @parthmishra , the function did not work when I tried to use it for my CI/CD setup. I created this PR: 3490 to address those issues. |
Ohh sorry I missed this completely! Cool that you did a update @omarzouk |
* updated with scheduling capability * added digits for the name * bad import
This PR includes code to add the functionality to schedule a pipeline from the python sdk. The added code is written to be similar to the implementation of how to run a pipeline in order to keep the API togheter.
I believe this is a feature that would be great to have in Kubeflow and also allow people to use it for CI/CD/MLops where the pipelines are run on schedule.
I am new to swagger and how the API works so please feel free to point out all possible improvements!
This change is