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

chore(sdk): remove kfp.deprecated from sdk, legacy samples, and legacy tests #11366

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ bazel-*
# VSCode
.vscode

# test yaml
sdk/python/tests/compiler/pipeline.yaml
sdk/python/tests/compiler/testdata/testpackage/pipeline.yaml

# Test temporary files
_artifacts

Expand Down
1 change: 0 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[pytest]
addopts = --ignore=sdk/python/kfp/deprecated --ignore=sdk/python/kfp/tests
testpaths = sdk/python/kfp

This file was deleted.

10 changes: 4 additions & 6 deletions samples/core/XGBoost/xgboost_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import kfp as kfp
from kfp.samples.test.utils import run_pipeline_func
from kfp.samples.test.utils import TestCase

from .xgboost_sample import xgboost_pipeline
from kfp.samples.test.utils import run_pipeline_func, TestCase

run_pipeline_func([
TestCase(
pipeline_func=xgboost_pipeline,
mode=kfp.dsl.PipelineExecutionMode.V2_ENGINE,
),
TestCase(pipeline_func=xgboost_pipeline),
])
6 changes: 3 additions & 3 deletions samples/core/caching/caching_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import kfp as kfp
from kfp.samples.test.utils import TestCase, relative_path, run_pipeline_func
from kfp.samples.test.utils import relative_path
from kfp.samples.test.utils import run_pipeline_func
from kfp.samples.test.utils import TestCase

run_pipeline_func([
TestCase(
pipeline_file=relative_path(__file__, 'caching.ipynb'),
mode=kfp.dsl.PipelineExecutionMode.V2_ENGINE,
run_pipeline=False,
),
])
51 changes: 0 additions & 51 deletions samples/core/condition/condition.py

This file was deleted.

22 changes: 7 additions & 15 deletions samples/core/condition/condition_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
from __future__ import annotations

import unittest
import kfp.deprecated as kfp

import kfp
from kfp.samples.test.utils import debug_verify
from kfp.samples.test.utils import KfpTask
from kfp.samples.test.utils import run_pipeline_func
from kfp.samples.test.utils import TestCase
import kfp_server_api
from ml_metadata.proto import Execution
from .condition import condition

from .condition_v2 import condition as condition_v2
from kfp.samples.test.utils import KfpTask, debug_verify, run_pipeline_func, TestCase


def verify_heads(t: unittest.TestCase, run: kfp_server_api.ApiRun,
Expand All @@ -43,24 +47,12 @@ def verify_tails(t: unittest.TestCase, run: kfp_server_api.ApiRun,
run_pipeline_func([
TestCase(
pipeline_func=condition_v2,
mode=kfp.dsl.PipelineExecutionMode.V2_ENGINE,
arguments={"force_flip_result": "heads"},
verify_func=verify_heads,
),
TestCase(
pipeline_func=condition_v2,
mode=kfp.dsl.PipelineExecutionMode.V2_ENGINE,
arguments={"force_flip_result": "tails"},
verify_func=verify_tails,
),
TestCase(
pipeline_func=condition,
mode=kfp.dsl.PipelineExecutionMode.V1_LEGACY,
arguments={"force_flip_result": "heads"},
),
TestCase(
pipeline_func=condition,
mode=kfp.dsl.PipelineExecutionMode.V1_LEGACY,
arguments={"force_flip_result": "tails"},
),
])
10 changes: 4 additions & 6 deletions samples/core/condition/nested_condition_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import kfp as kfp
from kfp.samples.test.utils import run_pipeline_func
from kfp.samples.test.utils import TestCase

from .nested_condition import my_pipeline
from kfp.samples.test.utils import run_pipeline_func, TestCase

run_pipeline_func([
TestCase(
pipeline_func=my_pipeline,
mode=kfp.dsl.PipelineExecutionMode.V2_ENGINE,
),
TestCase(pipeline_func=my_pipeline),
])
Loading
Loading