chore: Remove SDK and Python processor modules#591
Open
StefanoFioravanzo wants to merge 6 commits intokubeflow:mainfrom
Open
chore: Remove SDK and Python processor modules#591StefanoFioravanzo wants to merge 6 commits intokubeflow:mainfrom
StefanoFioravanzo wants to merge 6 commits intokubeflow:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
4494ad8 to
a33e86d
Compare
Remove the entire examples/sdk/ directory which contained examples for the Python decorator-based SDK workflow: - skeleton.py: Basic SDK usage tutorial - retry-pipeline.py: Retry configuration example - artifact.py: Artifact handling example - compression-pipeline.py: (already removed in Phase 1) - titanic/: ML classification example - quantile-regression/: Regression example - README.md: SDK documentation Kale 2.0 focuses exclusively on the notebook-based workflow. The SDK/decorator approach is being removed as part of the modernization effort. BREAKING CHANGE: SDK examples are no longer available. Signed-off-by: Stefano Fioravanzo <stefano.fioravanzo@gmail.com>
Remove the backend/kale/sdk/ module which provided Python decorator-based pipeline definition: - api.py: @pipeline, @step, and @artifact decorators - __init__.py: Module exports The SDK enabled writing pipelines using Python decorators instead of Jupyter notebooks. This workflow is being removed in Kale 2.0 to focus exclusively on the notebook-based approach. BREAKING CHANGE: The kale.sdk module is no longer available. Users should migrate to the notebook-based workflow. Signed-off-by: Stefano Fioravanzo <stefano.fioravanzo@gmail.com>
Remove the PythonProcessor and its associated template: - processors/pyprocessor.py: Processor that converted decorated Python functions into Pipeline objects - templates/py_function_template.jinja2: Jinja2 template for generating KFP components from Python functions The PythonProcessor enabled the SDK workflow where users could define pipelines using @pipeline and @step decorators. This is being removed in Kale 2.0 to focus exclusively on the notebook-based workflow. BREAKING CHANGE: PythonProcessor is no longer available. Signed-off-by: Stefano Fioravanzo <stefano.fioravanzo@gmail.com>
Update import statements to remove PythonProcessor references: - processors/__init__.py: Remove PythonProcessor import - kale/__init__.py: Remove PythonProcessor from imports The package now only exports NotebookProcessor for pipeline creation. Signed-off-by: Stefano Fioravanzo <stefano.fioravanzo@gmail.com>
Remove Python processor template selection logic from the compiler: - Remove PY_FN_TEMPLATE constant (py_function_template.jinja2) - Remove PIPELINE_ORIGIN dictionary that mapped processor.id to templates - Remove conditional check for processor.id == "nb" - Always use NB_FN_TEMPLATE for component generation The compiler now exclusively supports notebook-based pipeline generation, simplifying the code and removing the unused Python processor code path. Signed-off-by: Stefano Fioravanzo <stefano.fioravanzo@gmail.com>
With PythonProcessor removed, the BaseProcessor abstract class is no longer needed. Inline its logic directly into NotebookProcessor: - run() method - _post_pipeline() method - _configure_poddefaults() method - _apply_steps_defaults() method Signed-off-by: Stefano Fioravanzo <stefano.fioravanzo@gmail.com>
a33e86d to
1bfd7bc
Compare
|
backend/kale/processors/nbprocessor.py:231:32 backend/kale/processors/nbprocessor.py:237 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@pipeline,@stepdecorators)Changes
examples/sdk/directory (29 files)backend/kale/sdk/modulebackend/kale/processors/pyprocessor.pybackend/kale/processors/baseprocessor.pybackend/kale/templates/py_function_template.jinja2backend/kale/processors/__init__.py- Remove PythonProcessor exportbackend/kale/__init__.py- Remove SDK importsbackend/kale/processors/nbprocessor.py- Inline BaseProcessor logicbackend/kale/compiler.py- Remove processor type branchingContext
The SDK and Python processor were experimental features that added complexity without significant adoption. For 2.0, we're focusing on the core notebook-to-pipeline workflow.
With PythonProcessor removed, the BaseProcessor abstract class was no longer needed - its logic (
run(),_post_pipeline(),_configure_poddefaults(),_apply_steps_defaults()) has been inlined directly into NotebookProcessor.This is a breaking change appropriate for a major version bump.