Commit Graph

1392 Commits

Author SHA1 Message Date
Mai Nakagawa ef94ccd734
fix(sdk): Resolves issue when using ParallelFor with param and depending tasks (#11903)
Signed-off-by: Mai Nakagawa <nakagawa.mai@gmail.com>
2025-05-09 15:49:41 +00:00
Daniel Dowler 4503eae10d
fix(sdk): fix pip install for dev (#11891)
Signed-off-by: Daniel Dowler <12484302+dandawg@users.noreply.github.com>
2025-05-06 04:00:38 +00:00
Michael ed828b513a
feat(backend/sdk): enable dsl.Collected for parameters & artifacts (#11725)
* feat(backend/sdk): enable dsl.Collected for params & artifacts

Signed-off-by: zazulam <m.zazula@gmail.com>

* feat(backend): collect through loops & dags

Signed-off-by: zazulam <m.zazula@gmail.com>

To enable users to use loops similar to subdags, the initial collecting
implementation went only 1 layer deep of loops/subdags. This
implementation serves to handle multifacted approaches of pipelines that
users can generate.

---------

Signed-off-by: zazulam <m.zazula@gmail.com>
2025-05-05 22:55:37 +00:00
Christian c68640d950
fix(sdk): resolve issue when creating pipeline version from pipeline name using the cli. Fixes #11810 (#11866)
It is checked that not both are passed in as parameters, however in the
case of passing in the `pipeline_name` the `pipeline_id` is fetched via
the client and then both values are passed to `upload_pipeline_version`
defeating the initial check and raising an error.

Simply removing the `pipeline_name` argument from the call to
`upload_pipeline_version` fixes this as the `pipeline_id` is always set.

Signed-off-by: Christian Junker <chjdev@users.noreply.github.com>
2025-04-30 20:21:03 +00:00
Humair Khan fe51dfd792
chore(sdk): kfp and kfp-kubernetes 2.13 & 1.5 (#11870)
Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
2025-04-28 20:37:00 +00:00
Humair Khan e21bbbaf22
chore(sdk): release kfp sdk 2.12.2 (#11843)
Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
2025-04-23 20:02:57 +00:00
Matt Prahl f9d487cb60
fix(sdk): Add SDK support for setting resource limits on older KFP versions (#11839)
For context, the commit 70aaf8a9a4 removed
support for the old fields (without a resource_ prefix). This was
added back in commit 6ebf4aae03 but done in a way
that broke any usage of pipeline input parameters but was to support the
current KFP backend which did not yet support the new fields. In commit
7c931ae201, the old fields were removed
again but added support for the new field in KFP backend.

This commit addresses the case where a user is using a new SDK but with
a KFP backend prior to 2.4.

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
2025-04-21 13:46:27 +00:00
Michele Dolfi 866ff3556a
fix(deps): widen urllib3 upper bound to <3.0.0 (#11819)
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
2025-04-14 15:30:09 +00:00
Trevor Royer 1ad4f608a0
feat(sdk): add upload pipeline and upload pipeline version from pipeline function (#11804)
Signed-off-by: Trevor Royer <troyer@redhat.com>
2025-04-10 18:16:28 +00:00
Sidney Radcliffe 7c90446966
docs: mention that `set_container_image` works with dynamic images (#11795)
Signed-off-by: Sidney Radcliffe <sidneyradcliffe@gmail.com>
2025-04-09 11:19:21 +00:00
Ihar Hrachyshka 564522c42d
fix(local): warn about oci:// not supported too (#11794)
AFAIU no remote schema is currently supported for Local. This patch
consolidates all possible values under an Enum and then checks the
supplied url against all possible prefixes.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-04-08 16:00:21 +00:00
Anthonios Partheniou bd4fc5c667
fix(sdk): allow google-cloud-storage < 4 (#11735)
Signed-off-by: Anthonios Partheniou <partheniou@google.com>
2025-04-08 15:08:20 +00:00
Matt Prahl 2694605996
bug(backend,sdk): Use a valid path separator for Modelcar imports (#11767)
Forward slashes are invalid characters in a path and can't be escaped.

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
2025-03-21 20:35:27 +00:00
Stijn Tratsaert d1b15ef4da
fix(sdk): avoid conflicting component names in DAG when reusing pipelines (#11071)
* make component names in dag more unique

Signed-off-by: Stijn Tratsaert <stijn.tratsaert.it@gmail.com>

* tweak ordering so that renaming is handled in LIFO fashion

Signed-off-by: Stijn Tratsaert <stijn.tratsaert.it@gmail.com>

* add test that reuses a pipeline multiple times

Signed-off-by: Stijn Tratsaert <stijn.tratsaert.it@gmail.com>

---------

Signed-off-by: Stijn Tratsaert <stijn.tratsaert.it@gmail.com>
2025-03-18 23:25:45 +00:00
Chen Sun 1956d69968
chore(sdk): release kfp sdk 2.12.1 (#11715)
Signed-off-by: Chen Sun <chensun@users.noreply.github.com>
2025-02-28 19:22:30 +00:00
Chen Sun b5c204300b
chore(sdk): Relax kfp-server-api upper bound to include 2.4 (#11685)
Signed-off-by: Chen Sun <chensun@users.noreply.github.com>
2025-02-28 18:02:14 +00:00
Chen Sun c8fe908ba8
chore(sdk): release kfp sdk 2.12.0 (#11679)
Signed-off-by: Chen Sun <chensun@users.noreply.github.com>
2025-02-27 11:32:38 -08:00
Matt Prahl cc1c435f1e
feat(backend): Add support for importing models stored in the Modelcar format (sidecar) (#11606)
This allows dsl.import to leverage Modelcar container images in an OCI
repository. This works by having an init container prepull the image and
then adding a sidecar container when the launcher container is running.
The Modelcar container adds a symlink to its /models directory in an
emptyDir volume that is accessible by the launcher container. Once the
launcher is done running the user code, it stops the Modelcar
containers.

This approach has the benefit of leveraging image pull secrets
configured on the Kubernetes cluster rather than require separate
credentials for importing the artifact. Additionally, no data is copied
to the emptyDir volume, so the storage cost is just pulling the Modelcar
container image on the Kubernetes worker node.

Note that once Kubernetes supports OCI images as volume mounts for
several releases, consider replacing the init container with that
approach.

This also adds a new environment variable of PIPELINE_RUN_AS_USER to
set the runAsUser on all Pods created by Argo Workflows.

Resolves:
https://github.com/kubeflow/pipelines/issues/11584

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
2025-02-19 19:02:42 +00:00
Matt Prahl 6a13f4bad0
feat(backend): Add support for job and task placeholders in the KFP backend (#11599)
This adds support for the following placeholders in the KFP backend:

- dsl.PIPELINE_JOB_NAME_PLACEHOLDER
- dsl.PIPELINE_JOB_RESOURCE_NAME_PLACEHOLDER
- dsl.PIPELINE_JOB_ID_PLACEHOLDER
- dsl.PIPELINE_TASK_NAME_PLACEHOLDER
- dsl.PIPELINE_TASK_ID_PLACEHOLDER

Resolves:
https://github.com/kubeflow/pipelines/issues/10453

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
2025-02-10 22:10:43 +00:00
chahat sagar 926aec55d4
chor(test) : Fix kfp-sdk-test for different python versions (#11559)
Signed-off-by: chahatsagarmain <chahatsagar2003@gmail.com>
2025-02-10 19:25:07 +00:00
Ze Mao 42fc132616
feat: Introduce cache_key to sdk (#11466)
Signed-off-by: Ze Mao <zemao@google.com>
Co-authored-by: Ze Mao <zemao@google.com>
2025-02-10 09:10:49 -08:00
Daniel Dowler a81b51339c
fix: Update broken api-connect link (#11521)
Signed-off-by: Daniel Dowler <12484302+dandawg@users.noreply.github.com>
2025-01-26 19:20:49 +00:00
SimonDR-Boltzmann 113a4c6788
chore: bump requests-toolbelt to 1.0.0 (#10762)
* bump requests-toolbelt to 1.0.0

Signed-off-by: Simon De Ridder <simon.deridder+gitlab@silverfin.com>

* remove changes in test/kfp-functional-test

Signed-off-by: Simon De Ridder <simon.deridder+gitlab@silverfin.com>

---------

Signed-off-by: Simon De Ridder <simon.deridder+gitlab@silverfin.com>
2025-01-24 20:12:22 +00:00
Daniel Dowler dbefbb8ee9
fix(sdk): dsl.component docstring typo (#11547)
Signed-off-by: Daniel Dowler <12484302+dandawg@users.noreply.github.com>
2025-01-24 17:09:21 +00:00
Matt Prahl 8bce9c4ef6
Fix the failing exit handler SDK execution tests (#11519)
The SDK execution tests were not run on the PR CI that fixed the
pipeline run state to be failed even when an exit handler is run after a
failed component.

This also makes the SDK execution tests run whenever the backend
compiler code is modified to help prevent a similar issue.

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
2025-01-15 15:08:13 +00:00
Matt Prahl 7c931ae201
feat(sdk/backend): Add support for placeholders in resource limits (#11501)
The API introduced new fields prefixed with Resource (e.g.
ResourceCpuLimit) to replace the old fields without the prefix. The
Driver hadn't been updated to honor those fields but the SDK started
using them which led to unexpected behavior.

The Driver now honors both fields but prioritizes the new fields. The
SDK now only sets the new fields.

The outcome is that resource limits/requests can now use input
parameters.

Note that pipeline_spec_builder.py was doing some validation on the
limits/requests being set, but that's already handled in the user facing
method (e.g. set_cpu_limit).

Resolves:
https://github.com/kubeflow/pipelines/issues/11500

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
2025-01-09 15:35:24 +00:00
Dharmit Dalvi 399a597185
chore: Update test READMEs to reflect correct information on testing workflows (#11445)
Signed-off-by: ddalvi <ddalvi@redhat.com>
2024-12-18 19:22:11 +00:00
Chen Sun 2eed0b8faf
chore(sdk): release kfp sdk 2.11.0 (#11451)
Signed-off-by: Chen Sun <chensun@users.noreply.github.com>
2024-12-09 21:27:04 +00:00
Ze Mao d49b5d0c4b
chore(sdk): Upgrade kfp-pipeline-spec to 0.6.0 (#11434) (#11447)
Signed-off-by: Ze Mao <zemao@google.com>
Co-authored-by: Ze Mao <zemao@google.com>
2024-12-06 20:42:02 +00:00
Humair Khan 22e85de2bc
feat(sdk/backend): enable parameterization of container images (#11404)
This change allows component base images to be parameterized using runtime pipeline parameters. The container images can be specified within an @pipeline decorated function, and takes precedence over the @component(base_image=..) argument.

This change also adds logic to resolve these runtime parameters in the argo driver logic. It also includes resolution steps for resolving the accelerator type which functions the same way but was missing the resolution logic. The resolution logic is a generic workaround solution for any run time pod spec input parameters that cannot be resolved because they cannot be added dynamically in the argo pod spec container template.

Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
2024-12-04 12:45:00 +00:00
Ricardo Martinelli de Oliveira 6ebf4aae03
fix(sdk): Backport fixes in kubeflow/pipelines#11075 (#11392)
Introduced back the functions to convert k8s size values to float, but
moved to kfp.dsl.utils

Signed-off-by: Ricardo M. Oliveira <rmartine@redhat.com>
2024-12-03 22:32:59 +00:00
Yael Fishel 4a64fe9532
fix(sdk): Add error handling. Fixes #11164 (#11356)
Signed-off-by: Yael <fishel.yael@gmail.com>
2024-12-03 00:24:58 +00:00
Tom Coufal 35793be416
feat(cli): expose existing_token client property (#11400)
Signed-off-by: Tomas Coufal <tcoufal@redhat.com>
2024-11-25 21:24:51 +00:00
Chen Sun 77f23c950e
chore(sdk): release KFP SDK 2.10.1 (#11379)
Signed-off-by: Chen Sun <chensun@users.noreply.github.com>
2024-11-14 21:46:20 +00:00
Chen Sun 1ea240e893
chore(sdk): support Python 3.13 (#11372)
* chore(sdk): support Python 3.13

Signed-off-by: Chen Sun <chensun@users.noreply.github.com>

* chore: remove python_requires upperbound for kfp-kubernetes

Signed-off-by: Chen Sun <chensun@users.noreply.github.com>

---------

Signed-off-by: Chen Sun <chensun@users.noreply.github.com>
2024-11-14 02:36:19 +00:00
Humair Khan 64e390069d
fix(sdk): accelerator type setting in kfp (#11373)
An api breaking change was introduced in 2.10 that removed deprecate
fields in the compilation step for the accelerator fields. This has
resulted in the driver being unable to fetch the old fields. This change
re-introduces the deprecated fields to allow for a proper timespan for
allowing driver to adjust to the new values.

Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
2024-11-13 23:43:18 +00:00
Chen Sun 11a8b866e9
chore(sdk): remove kfp.deprecated from sdk, legacy samples, and legacy tests (#11366)
* chore(sdk): remove kfp.deprecated and legacy samples and tests

Signed-off-by: Chen Sun <chensun@users.noreply.github.com>

* chore: clean up unused imports

Signed-off-by: Chen Sun <chensun@users.noreply.github.com>

---------

Signed-off-by: Chen Sun <chensun@users.noreply.github.com>
2024-11-12 17:26:18 +00:00
Chen Sun 1708ce79bb
chore(sdk): release KFP SDK 2.10.0 (#11364)
* chore(sdk): release KFP SDK 2.10.0

Signed-off-by: Chen Sun <chensun@users.noreply.github.com>

* fix: version check regex in test

Signed-off-by: Chen Sun <chensun@users.noreply.github.com>

---------

Signed-off-by: Chen Sun <chensun@users.noreply.github.com>
2024-11-08 01:38:13 +00:00
Chen Sun 8d018aff6e
feat(sdk)!: stop auto-populating metrics as dag output (#11362)
* feat(sdk)!: stop auto-populating metrics as dag output

Signed-off-by: Chen Sun <chensun@users.noreply.github.com>

* add release note

Signed-off-by: Chen Sun <chensun@users.noreply.github.com>

---------

Signed-off-by: Chen Sun <chensun@users.noreply.github.com>
2024-11-07 22:27:12 +00:00
Alex c5b787aacc
feat(backend): implement subdag output resolution (#11196)
* fix(backend): implement subdag output resolution

Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>
Co-authored-by: zazulam <m.zazula@gmail.com>
Co-authored-by: CarterFendley <carter.fendley@gmail.com>

* Add support for subdags of subdags

Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>
Co-authored-by: zazulam <m.zazula@gmail.com>
Co-authored-by: CarterFendley <carter.fendley@gmail.com>

* handle edge case

Signed-off-by: zazulam <m.zazula@gmail.com>
Co-authored-by: droctothorpe <mythicalsunlight@gmail.com>

* Handle artifact outputs as well

Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>
Co-authored-by: zazulam <m.zazula@gmail.com>
Co-authored-by: CarterFendley <carter.fendley@gmail.com>
Co-authored-by: edmondop <edmondo.porcu@gmail.com>

* Simplify parameter handling logic

Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>
Co-authored-by: zazulam <m.zazula@gmail.com>

* Begin decomposition

Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>

* Add support for multiple artifacts and params

Signed-off-by: Tyler Kalbach <tkalbach@athenahealth.com>

* Implement large tests for subdagio

Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>
Co-authored-by: zazulam <m.zazula@gmail.com>
Co-authored-by: CarterFendley <carter.fendley@gmail.com>

* Address PR comments & handle oneof

Signed-off-by: zazulam <m.zazula@gmail.com>
Co-authored-by: droctothorpe <mythicalsunlight@gmail.com>

* update backend metadata client test

Signed-off-by: zazulam <m.zazula@gmail.com>

* Enable nested pipeline IO large tests in CI

Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>
Co-authored-by: CarterFendley <carter.fendley@gmail.com>
Co-authored-by: zazulam <m.zazula@gmail.com>

* Execute narrow lookup before broad task lookup

Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>
Co-authored-by: zazulam <m.zazula@gmail.com>
Co-authored-by: CarterFendley <carter.fendley@gmail.com>

* reimplement getDAGTasks to address edge cases

Signed-off-by: zazulam <m.zazula@gmail.com>
Co-authored-by: droctothorpe <mythicalsunlight@gmail.com>

* handle parallelfor in getDAGTask

Signed-off-by: zazulam <m.zazula@gmail.com>
Co-authored-by: droctothorpe <mythicalsunlight@gmail.com>

* Check if iterationIndex is nil

Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>
Co-authored-by: zazulam <m.zazula@gmail.com>

* check iteration_count for parallel tasks

Signed-off-by: zazulam <m.zazula@gmail.com>
Co-authored-by: droctothorpe <mythicalsunlight@gmail.com>

* update comment & disable v(4) logs

Signed-off-by: zazulam <m.zazula@gmail.com>

* Address Chen's feedback

Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>
Co-authored-by: zazulam <m.zazula@gmail.com>

* Clarify comment

Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>

---------

Signed-off-by: droctothorpe <mythicalsunlight@gmail.com>
Signed-off-by: zazulam <m.zazula@gmail.com>
Signed-off-by: Tyler Kalbach <tkalbach@athenahealth.com>
Co-authored-by: zazulam <m.zazula@gmail.com>
Co-authored-by: CarterFendley <carter.fendley@gmail.com>
Co-authored-by: edmondop <edmondo.porcu@gmail.com>
Co-authored-by: Tyler Kalbach <tkalbach@athenahealth.com>
2024-10-31 06:19:12 +00:00
Greg Sheremeta df4d7878c4
feat(sdk): add PipelineConfig to DSL to re-implement pipeline-level config (#11112)
KFP v1 supported setting pipeline-level configuration via a
`PipelineConf` class. This class was deprecated and no replacement
was added to KFP v2.

add new PipelineConfig class to support setting pipeline-level
configuration in KFP v2.

Signed-off-by: Greg Sheremeta <gshereme@redhat.com>
2024-10-29 18:08:11 +00:00
Sébastien Han df28e891c4
feat(component): execute in a virtual env (#11326)
This commit introduces the ability to run the component inside a virtual
environment, which is particularly useful when the Python system site package
directory is read-only, causing pip to fail during the installation of kfp and
other dependencies.

To bypass this issue, a writable temporary directory is selected to create a
virtual environment that inherits the global system site packages. The entire
workflow is then executed from within this virtual environment.

Furthermore, a new field, `use_venv`, has been added to the component
decorator, with a default value of `False`.

Signed-off-by: Sébastien Han <seb@redhat.com>
2024-10-29 17:02:11 +00:00
Dharmit Dalvi 3f495229f2
feat(sdk): Allow disabling default caching via a CLI flag and env var (#11222)
* feat(sdk): Allow setting a default of execution caching disabled via a compiler CLI flag and env var

Co-authored-by: Greg Sheremeta <gshereme@redhat.com>
Signed-off-by: ddalvi <ddalvi@redhat.com>

* Add tests for disabling default caching var and flag

Signed-off-by: ddalvi <ddalvi@redhat.com>

---------

Signed-off-by: ddalvi <ddalvi@redhat.com>
Co-authored-by: Greg Sheremeta <gshereme@redhat.com>
2024-09-25 22:28:35 +00:00
KevinGrantLee 70aaf8a9a4 feat(sdk): support dynamic machine type parameters in pipeline task setters (#11097)
* temp title: change title

Signed-off-by: KevinGrantLee <kglee@google.com>
2024-09-20 17:30:32 +00:00
Kevin James 0b92f86408
refactor: fix invalid escape sequences (#11147)
Signed-off-by: Kevin James <KevinJames@thekev.in>
2024-09-20 16:24:30 +00:00
Ricardo Martinelli de Oliveira ba006bddcb
chore: fix CI by adding a dependency of python/sdk for the e2e-test (#11221)
Signed-off-by: Ricardo M. Oliveira <rmartine@redhat.com>
2024-09-17 21:30:27 +00:00
Diego Lovison 123ed1eb30
chore: Set Python 3.9 as the Minimum Supported Version (#11159)
Signed-off-by: Diego Lovison <diegolovison@gmail.com>
2024-09-12 19:10:22 +00:00
Chen Sun 1cded35cf5
chore(sdk): release KFP SDK 2.9.0 (#11193)
Signed-off-by: Chen Sun <chensun@users.noreply.github.com>
2024-09-09 23:47:20 +00:00
Chen Sun dfd4cc1e53
feat(sdk)!: Pin kfp-pipeline-spec==0.4.0, kfp-server-api>=2.1.0,<2.4.0 (#11192)
Signed-off-by: Chen Sun <chensun@users.noreply.github.com>
2024-09-09 23:06:20 +00:00
ege uçak a59261c994
chore(sdk): Loosening kubernetes dependency constraint (#11079)
* Loosening kubernetes dependency constraint

Signed-off-by: egeucak <egeucak75@hotmail.com>

* added setuptools in test script

Signed-off-by: egeucak <egeucak75@hotmail.com>

---------

Signed-off-by: egeucak <egeucak75@hotmail.com>
2024-09-06 13:54:56 -07:00