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

Add transformer to kserve component #1

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0cb2217
chore(components): update GCPC custom job docstrings
connor-mccarthy Oct 23, 2023
2054b7c
feat(components) Extend kserve component (#10136)
magdalenakuhn17 Oct 23, 2023
21079b5
feat(components): [text2sql] Implement preprocess component logic
Oct 24, 2023
ebb4245
feat(components): [text2sql] Generate table names by model batch pred…
Oct 24, 2023
c0ef67c
chore(components): update GCPC docstrings
connor-mccarthy Oct 24, 2023
04aac25
chore(components): add GCPC Python 3.7 EOL warning
connor-mccarthy Oct 24, 2023
c383eb6
chore(components): Update AutoML Vision data converter component
KCFindstr Oct 24, 2023
e3b1863
chore(sdk): add Python 3.7 EOL notice (#10139)
connor-mccarthy Oct 24, 2023
0d75611
feat(components): [endpoint_batch_predict] Initialize component
Oct 24, 2023
570e56d
fix(components): [text2sql] Turn model_inference_results_path to mode…
Oct 25, 2023
c83329f
chore(components): fix GCPC markdown docstrings rendering
Oct 25, 2023
7ab05d8
chore(sdk): Remove the ` (<type>)`from docstring args. (#10159)
rickyxie0929 Oct 26, 2023
2882fcf
chore(sdk): add pytest.ini file (#10160)
connor-mccarthy Oct 26, 2023
02e00e8
fix(sdk): type annotation for client credentials (#10158)
thesuperzapper Oct 26, 2023
03df9df
chore(sdk): fix local test failure (#10161)
connor-mccarthy Oct 26, 2023
52f5cf5
feat(backend): Support consuming parent DAG input artifact (#10162)
chensun Oct 26, 2023
1bee8be
feat(components): [text2sql] Generate column names by model batch pre…
Oct 26, 2023
c0093ec
feat(backend): Update driver and launcher images (#10164)
chensun Oct 27, 2023
58ce09e
chore(release): bumped version to 2.0.3
chensun Oct 27, 2023
f250700
chore(sdk): release KFP SDK 2.4.0 (#10167)
connor-mccarthy Oct 27, 2023
9a1447a
docs(sdk): fix readthedocs build error (#10170)
connor-mccarthy Oct 27, 2023
1ba6d5f
docs(sdk): fix readthedocs build error, additional changes (#10173)
connor-mccarthy Oct 27, 2023
0268ca9
adjust component.yaml and source code to add transformer to ifsvc
magdalenakuhn17 Oct 29, 2023
e2647f3
fix comma in component args
magdalenakuhn17 Oct 29, 2023
3e6812c
fix more commas in component args
magdalenakuhn17 Oct 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ version: 2
sphinx:
configuration: docs/conf.py
python:
version: 3.7
install:
- requirements: docs/requirements.txt
build:
os: ubuntu-22.04
tools:
python: "3.7"
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# Changelog

### [2.0.3](https://github.com/kubeflow/pipelines/compare/2.0.2...2.0.3) (2023-10-27)


### Features

* **backend:** Support consuming parent DAG input artifact ([\#10162](https://github.com/kubeflow/pipelines/issues/10162)) ([52f5cf5](https://github.com/kubeflow/pipelines/commit/52f5cf51c4a6c233aae57125561c0fc95c4fd20f))
* **backend:** Update driver and launcher images ([\#10164](https://github.com/kubeflow/pipelines/issues/10164)) ([c0093ec](https://github.com/kubeflow/pipelines/commit/c0093ecef6bc5f056efa135d019267327115d79d))
* **components:** [endpoint_batch_predict] Initialize component ([0d75611](https://github.com/kubeflow/pipelines/commit/0d7561199751e83b4d7e1603c3d32d4088a7e208))
* **components:** [text2sql] Generate column names by model batch predict ([1bee8be](https://github.com/kubeflow/pipelines/commit/1bee8be071a91f44c0129837c381863327cb337d))
* **components:** [text2sql] Generate table names by model batch prediction ([ebb4245](https://github.com/kubeflow/pipelines/commit/ebb42450d0b07eaa8de35a3f6b70eacb5f26f0d8))
* **components:** [text2sql] Implement preprocess component logic ([21079b5](https://github.com/kubeflow/pipelines/commit/21079b5910e597a38b67853f3ecfb3929344371e))
* **components:** [text2sql] Initialize preprocess component and integrate with text2sql pipeline ([9aa750e](https://github.com/kubeflow/pipelines/commit/9aa750e62f6e225d037ecdda9bf7cab95f05675d))
* **components:** [text2sql] Initialize evaluation component ([ea93979](https://github.com/kubeflow/pipelines/commit/ea93979eed02e131bd20180da149b9465670dfe1))
* **components:** [text2sql] Initialize validate and process component ([633ddeb](https://github.com/kubeflow/pipelines/commit/633ddeb07e9212d2e373dba8d20a0f6d67ab037d))
* **components:** Add ability to preprocess chat llama datasets to `_implementation.llm.chat_dataset_preprocessor` ([99fd201](https://github.com/kubeflow/pipelines/commit/99fd2017a76660f30d0a04b71542cbef45783633))
* **components:** Add question_answer support for AutoSxS default instructions ([412216f](https://github.com/kubeflow/pipelines/commit/412216f832a848bfc61ce289aed819d7f2860fdd))
* **components:** Add sliced evaluation metrics support for custom and unstructured AutoML models in evaluation feature attribution pipeline ([d8a0660](https://github.com/kubeflow/pipelines/commit/d8a0660df525f5695015e507e981bceff836dd3d))
* **components:** Add sliced evaluation metrics support for custom and unstructured AutoML models in evaluation pipeline ([0487f9a](https://github.com/kubeflow/pipelines/commit/0487f9a8b1d8ab0d96d757bd4b598ffd353ecc81))
* **components:** add support for customizing model_parameters in LLM eval text generation and LLM eval text classification pipelines ([d53ddda](https://github.com/kubeflow/pipelines/commit/d53dddab1c8a042e58e06ff6eb38be82fefddb0a))
* **components:** Make `model_checkpoint` optional for `preview.llm.infer_pipeline` ([e8fb699](https://github.com/kubeflow/pipelines/commit/e8fb6990dfdf036c941c522f9b384ff679b38ca6))
* **components:** migrate `DataflowFlexTemplateJobOp` to GA namespace (now `v1.dataflow.DataflowFlexTemplateJobOp`) ([faba922](https://github.com/kubeflow/pipelines/commit/faba9223ee846d459f7bb497a6faa3c153dcf430))
* **components:** Set display names for SFT, RLHF and LLM inference pipelines ([1386a82](https://github.com/kubeflow/pipelines/commit/1386a826ba2bcdbc19eb2007ca43f6acd1031e4d))
* **components:** Support service account in kubeflow model_batch_predict component ([1682ce8](https://github.com/kubeflow/pipelines/commit/1682ce8adeb2c55a155588eae7492b2f0a8b783a))
* **components:** Update image tag used by llm pipelines ([4d71fda](https://github.com/kubeflow/pipelines/commit/4d71fdac3fc92dd4d54c6be3a28725667b8f3c5e))
* **sdk:** support a Pythonic artifact authoring style ([\#9932](https://github.com/kubeflow/pipelines/issues/9932)) ([8d00d0e](https://github.com/kubeflow/pipelines/commit/8d00d0eb9a1442ed994b6a90acea88604efc6423))
* **sdk:** support collecting outputs from conditional branches using `dsl.OneOf` ([\#10067](https://github.com/kubeflow/pipelines/issues/10067)) ([2d3171c](https://github.com/kubeflow/pipelines/commit/2d3171cbfec626055e59b8a58ce83fb54ecad113))


### Bug Fixes

* **components:** [text2sql] Turn model_inference_results_path to model_inference_results_directory and remove duplicate comment ([570e56d](https://github.com/kubeflow/pipelines/commit/570e56dd09af32e173cf041eed7497e4533ec186))
* **frontend:** Replace twitter artifactory endpoint with npm endpoint. ([\#10099](https://github.com/kubeflow/pipelines/issues/10099)) ([da6a360](https://github.com/kubeflow/pipelines/commit/da6a3601468282c0592eae8e89a3d97b982e2d43))
* **sdk:** fix bug when `dsl.importer` argument is provided by loop variable ([\#10116](https://github.com/kubeflow/pipelines/issues/10116)) ([73d51c8](https://github.com/kubeflow/pipelines/commit/73d51c8a23afad97efb6d7e7436c081fa22ce24d))
* **sdk:** Fix OOB for IPython and refactor. Closes [\#10075](https://github.com/kubeflow/pipelines/issues/10075). ([\#10094](https://github.com/kubeflow/pipelines/issues/10094)) ([c903271](https://github.com/kubeflow/pipelines/commit/c9032716ab2013df56cb1078a703d48ed8e36fb4))
* **sdk:** type annotation for client credentials ([\#10158](https://github.com/kubeflow/pipelines/issues/10158)) ([02e00e8](https://github.com/kubeflow/pipelines/commit/02e00e8439e9753dbf82856ac9c5a7cec8ce3243))


### Other Pull Requests

* feat(components) Extend kserve component ([\#10136](https://github.com/kubeflow/pipelines/issues/10136)) ([2054b7c](https://github.com/kubeflow/pipelines/commit/2054b7c45d4831c787115563c8be0048abcb9be1))
* No public description ([0e240db](https://github.com/kubeflow/pipelines/commit/0e240db39799cb0afbd8c7f982ffdd4f9eb58121))

### [2.0.2](https://github.com/kubeflow/pipelines/compare/2.0.0...2.0.2) (2023-10-11)


Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.2
2.0.3
4 changes: 2 additions & 2 deletions backend/api/v1beta1/python_http_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ This file contains REST API specification for Kubeflow Pipelines. The file is au

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 2.0.2
- Package version: 2.0.2
- API version: 2.0.3
- Package version: 2.0.3
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://www.google.com](https://www.google.com)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from __future__ import absolute_import

__version__ = "2.0.2"
__version__ = "2.0.3"

# import apis into sdk package
from kfp_server_api.api.experiment_service_api import ExperimentServiceApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/2.0.2/python'
self.user_agent = 'OpenAPI-Generator/2.0.3/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ def to_debug_report(self):
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 2.0.2\n"\
"SDK Package Version: 2.0.2".\
"Version of the API: 2.0.3\n"\
"SDK Package Version: 2.0.3".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
2 changes: 1 addition & 1 deletion backend/api/v1beta1/python_http_client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "kfp-server-api"
VERSION = "2.0.2"
VERSION = "2.0.3"
# To install the library, run the following
#
# python setup.py install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Kubeflow Pipelines API",
"version": "2.0.2",
"version": "2.0.3",
"description": "This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition.",
"contact": {
"name": "google",
Expand Down
4 changes: 2 additions & 2 deletions backend/api/v2beta1/python_http_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ This file contains REST API specification for Kubeflow Pipelines. The file is au

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 2.0.2
- Package version: 2.0.2
- API version: 2.0.3
- Package version: 2.0.3
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://www.google.com](https://www.google.com)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from __future__ import absolute_import

__version__ = "2.0.2"
__version__ = "2.0.3"

# import apis into sdk package
from kfp_server_api.api.auth_service_api import AuthServiceApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/2.0.2/python'
self.user_agent = 'OpenAPI-Generator/2.0.3/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ def to_debug_report(self):
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 2.0.2\n"\
"SDK Package Version: 2.0.2".\
"Version of the API: 2.0.3\n"\
"SDK Package Version: 2.0.3".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
2 changes: 1 addition & 1 deletion backend/api/v2beta1/python_http_client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "kfp-server-api"
VERSION = "2.0.2"
VERSION = "2.0.3"
# To install the library, run the following
#
# python setup.py install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Kubeflow Pipelines API",
"version": "2.0.2",
"version": "2.0.3",
"description": "This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition.",
"contact": {
"name": "google",
Expand Down
4 changes: 2 additions & 2 deletions backend/src/v2/compiler/argocompiler/argo.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ func Compile(jobArg *pipelinespec.PipelineJob, kubernetesSpecArg *pipelinespec.S
wf: wf,
templates: make(map[string]*wfapi.Template),
// TODO(chensun): release process and update the images.
driverImage: "gcr.io/ml-pipeline/kfp-driver@sha256:fa68f52639b4f4683c9f8f468502867c9663823af0fbcff1cbe7847d5374bf5c",
launcherImage: "gcr.io/ml-pipeline/kfp-launcher@sha256:6641bf94acaeec03ee7e231241800fce2f0ad92eee25371bd5248ca800a086d7",
driverImage: "gcr.io/ml-pipeline/kfp-driver@sha256:8e60086b04d92b657898a310ca9757631d58547e76bbbb8bfc376d654bef1707",
launcherImage: "gcr.io/ml-pipeline/kfp-launcher@sha256:50151a8615c8d6907aa627902dce50a2619fd231f25d1e5c2a72737a2ea4001e",
job: job,
spec: spec,
executors: deploy.GetExecutors(),
Expand Down
16 changes: 14 additions & 2 deletions backend/src/v2/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,11 @@ func resolveInputs(ctx context.Context, dag *metadata.DAG, iterationIndex *int,
if err != nil {
return nil, err
}
glog.Infof("parent DAG input parameters %+v", inputParams)
inputArtifacts, err := mlmd.GetInputArtifactsByExecutionID(ctx, dag.Execution.GetID())
if err != nil {
return nil, err
}
glog.Infof("parent DAG input parameters: %+v, artifacts: %+v", inputParams, inputArtifacts)
inputs = &pipelinespec.ExecutorInput_Inputs{
ParameterValues: make(map[string]*structpb.Value),
Artifacts: make(map[string]*pipelinespec.ArtifactList),
Expand Down Expand Up @@ -998,7 +1002,15 @@ func resolveInputs(ctx context.Context, dag *metadata.DAG, iterationIndex *int,
}
switch t := artifactSpec.Kind.(type) {
case *pipelinespec.TaskInputsSpec_InputArtifactSpec_ComponentInputArtifact:
return nil, artifactError(fmt.Errorf("component input artifact not implemented yet"))
inputArtifactName := artifactSpec.GetComponentInputArtifact()
if inputArtifactName == "" {
return nil, artifactError(fmt.Errorf("component input artifact key is empty"))
}
v, ok := inputArtifacts[inputArtifactName]
if !ok {
return nil, artifactError(fmt.Errorf("parent DAG does not have input artifact %s", inputArtifactName))
}
inputs.Artifacts[name] = v

case *pipelinespec.TaskInputsSpec_InputArtifactSpec_TaskOutputArtifact:
taskOutput := artifactSpec.GetTaskOutputArtifact()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Google Cloud Pipeline Components."""
from google_cloud_pipeline_components.version import __version__
import sys
import warnings

if sys.version_info < (3, 8):
warnings.warn(
(
'Python 3.7 has reached end-of-life. Google Cloud Pipeline Components'
' will drop support for Python 3.7 on April 23, 2024. To use new'
' versions of the KFP SDK after that date, you will need to upgrade'
' to Python >= 3.8. See https://devguide.python.org/versions/ for'
' more details.'
),
FutureWarning,
stacklevel=2,
)
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from google_cloud_pipeline_components._implementation.model_evaluation.chunking.component import chunking as ChunkingOp
from google_cloud_pipeline_components._implementation.model_evaluation.data_sampler.component import evaluation_data_sampler as EvaluationDataSamplerOp
from google_cloud_pipeline_components._implementation.model_evaluation.dataset_preprocessor.component import dataset_preprocessor_error_analysis as EvaluationDatasetPreprocessorOp
from google_cloud_pipeline_components._implementation.model_evaluation.endpoint_batch_predict.component import evaluation_llm_endpoint_batch_predict_pipeline_graph_component
from google_cloud_pipeline_components._implementation.model_evaluation.error_analysis_annotation.component import error_analysis_annotation as ErrorAnalysisAnnotationOp
from google_cloud_pipeline_components._implementation.model_evaluation.evaluated_annotation.component import evaluated_annotation as EvaluatedAnnotationOp
from google_cloud_pipeline_components._implementation.model_evaluation.feature_attribution.feature_attribution_component import feature_attribution as ModelEvaluationFeatureAttributionOp
Expand All @@ -41,6 +42,7 @@
'evaluation_llm_safety_bias_pipeline',
'evaluation_llm_embedding_pipeline',
'evaluation_llm_text2sql_pipeline',
'evaluation_llm_endpoint_batch_predict_pipeline_graph_component',
'ChunkingOp',
'EvaluationDataSamplerOp',
'EvaluationDatasetPreprocessorOp',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2023 The Kubeflow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Google Cloud Pipeline Evaluation Endpoint Batch Predict Component."""
Loading