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

Implement kfp runner with tests #359

Merged
merged 3 commits into from
Aug 16, 2023
Merged

Implement kfp runner with tests #359

merged 3 commits into from
Aug 16, 2023

Conversation

GeorgesLorre
Copy link
Collaborator

PR implementing the Kfp runner.

Had some issues with adding the pipeline name to the kfp spec (solved now) because we need it to launch a run with a sensible name.

Remarks:

  • removed some logic around deleting existing pipelines that we have (which was not used afaik)
  • I tested it on a toy pipeline and was able to push a run on the GCP kubeflow
  • I will implement the CLI (for both the runner and compiler) in a separate PR
  • I will also make a separate PR for cleaning up the kfp imports and extras.

Copy link
Contributor

@PhilippeMoussalli PhilippeMoussalli left a comment

Choose a reason for hiding this comment

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

Thanks Georges! Really nice implementation

Left a few minor comments but should be good to go

@@ -226,7 +226,7 @@ def _resolve_imports(self):
self.kfp = kfp
except ImportError:
msg = """You need to install kfp to use the Kubeflow compiler,\n
you can install it with `pip install --extras pipelines`"""
you can install it with `pip install --extras kfp`"""
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the extras is still called pipelines. You can however remove the k8s dependency from it since we're no longer using it and maybe rename pipelines to kfp

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will just update this and rename the pipelines extra to kfp in a different PR

new=MockKfpClient,
):
runner = KubeflowRunner(host="some_host")
runner.run(input_spec=input_spec_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

What are we testing here exactly? I know it's difficult since we're mocking the pipeline run method. Can we maybe validate the run_url?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We are testing nothing explicit but if the runner would error then the test would fail. I'll add an assert to see if the url is passed properly.

@GeorgesLorre
Copy link
Collaborator Author

@PhilippeMoussalli resolved your comments

@PhilippeMoussalli
Copy link
Contributor

@PhilippeMoussalli resolved your comments

Thanks :) good to merge

@GeorgesLorre GeorgesLorre merged commit 06519b8 into main Aug 16, 2023
5 checks passed
@GeorgesLorre GeorgesLorre deleted the feature/kf-runner branch August 16, 2023 11:02
Hakimovich99 pushed a commit that referenced this pull request Oct 16, 2023
PR implementing the Kfp runner.

Had some issues with adding the pipeline name to the kfp spec (solved
now) because we need it to launch a run with a sensible name.

Remarks:
- removed some logic around deleting existing pipelines that we have
(which was not used afaik)
- I tested it on a toy pipeline and was able to push a run on the GCP
kubeflow
- I will implement the CLI (for both the runner and compiler) in a
separate PR
- I will also make a separate PR for cleaning up the kfp imports and
extras.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants