-
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
Enable local test runner for Kubeflow Pipelines #1138
Comments
Issue-Label Bot is automatically applying the label Links: dashboard, app homepage and code for this bot. |
Some ideal requirements to consider:
|
I guess only the proper local kubernetes cluster can satisfy this requirement. The test environment needs Minikube installed. |
I think it's better have a function to perform this instead of overloading the decorator:
If we want to differentiate, we can have
|
BTW, what about providing users with a VM image that has all the tools installed (minikube and etc.) to make local execution easy? |
Thank you so much for tracking this issue. Another thing to consider is that we may want to have a way to inject a stub to a component inside the pipeline, if a component is making call to foreign services such as Dataflow. |
related: #1104 |
Closing as infeasible/obsolete for now. |
@Ark-kun not sure if you intentionally meant to re-open this issue? Are you working on local runner for KFP? |
I think that your idea is still pretty valid and useful. It would be nice to have that feature for component testing and experimentation. I've recently started creating components in my free time and testing them was not that easy without having a Kubernetes cluster. What do you think? |
FYI, I'm thinking on bring a lightweight local runner in a new design. It may rely on TFX SDK's docker launcher. It's still early investigation phase, together with IR work. |
FYI, for testing TFX has this tensorflow/tfx#1986 WIP. That said it's pretty different than local dev. |
(in IR based impl, we may handle it with Docker runner) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
/lifecycle frozen |
Are we interested in adding instructions on how to deploy locally to Minikube based upon the local code for development @Bobgy? Will not be a big change but would require the user to build all the images and add an overlay that uses these images instead of the official released images. |
@NikeNano I think that's a different topic, this issue is about creating a local runner that helps experiment with KFP. Rather than developing KFP. |
@Bobgy @Ark-kun @numerology I have create a PR(#4983) trying to provide a local runner which will run Kubeflow pipeline on docker or locally. |
…ixes #1138 (#4983) * add local runner which will run ops in docker or locally * use str.format rather than f-string * add some brief doc string in local client * comment the unittest about running op in docker, which is not supported in CI env for now * Add some brief docstring about DAG used in local client * make graph/reverse_graph of DAG as property to keep them in sync * make some methods of LocalClient static * remove circular reference in local client * Incapsulate artifact storage root in the constuctor of LocalClient * Add Alpha notice for kfp.run_pipeline_func_locally * Support list of local images in kfp.run_pipeline_func_locally * make staticmethod to module level private method * Trivial modification according to code review, some renaming or docstring * local runner support components without '--' as argument prefix * make output file of op in loop unique * Local runner decides whether run component in docker or in local process base on ExecutionMode
Today, there is no way to run a KFP pipeline on a local machine (outside of running a mini Kubernetes cluster locally). This makes testing pipelines for user difficult as they always have to go through the steps of uploading to a cluster to run even small tests on the correctness of the pipeline.
To solve this problem, it would be nice if KFP offers a way to run pipelines locally. Such a mode does not have to have full fidelity with what's possible in a cluster run with Argo to begin with. A simple approach of using
docker run
to run each step sequentially, with a mounted local volume for passing parameters, will go a long way towards satisfying most local-run use-cases.As a suggestion, we can modify the pipeline decorator to enable this behaviour when the user adds a keyword like
test = True
, i.e.The text was updated successfully, but these errors were encountered: