You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously on KFP SDK v1.x, we had two modes of import, signaling two different compilers with different compilation results.
import kfp imports KFP v1 and v2-compatible mode compiler
import kfp.v2 imports KFP v2 mode compiler
Two modes of import are confusing to the users. Although users are in SDK v1.x, they have kfp and kfp.v2 to choose from, where normally the package name (kfp) indicates the default versioning.
As KFP SDK evolves to v2.0 version, we want to set a standard way of importing KFP namespace, for easier usage and also cleaner code for maintenance.
Proposed Namespace for KFP SDK v2
Since the package name indicates the default versioning, we propose in KFP v2 and possible future iterations, we will always use kfp as the official namespace.
import kfp imports KFP v2 mode compiler
For v1-related features, users need to go back to SDK v1.x and use import kfp.
In this way, users don't need to change imports when they are experiencing major version updates.
For existing GA customers, we will provide an alias of kfp.v2 to kfp, and throw a warning if user uses kfp.v2. Full set of warnings will be documented in the migration guide.
Note:
v2-compatible mode was launched as an experimental feature, so it won't appear in v2 SDK and follows cloud deprecation policy.
For KFP SDK v1.x features, we will maintain it for 1 year after GA of SDK v2.0. After that, we will be providing security patches and major bug fixes for any bug that results in user code breaking until usage on GCP (Vertex and KFP) is 0.
User Impact on Namespace
KFP V1 users migration (NO changes)
Current
from kfp import dsl
from kfp import compiler
@dsl.pipeline(name='my-pipeline')
def pipeline():
...
compiler.Compiler().compile(pipeline,
'path')
Vertex Pipeline users (primarily removing v2 from the imports).
Note: there are other changes suggested for Vertex Pipeline users which will be documented in the migration doc.
Current
Anticipated change
from kfp.v2 import dsl
from kfp.v2 import compiler
@dsl.pipeline(name='my-pipeline')
def pipeline():
...
compiler.Compiler().compile(pipeline,
'path')
from kfp import dsl
from kfp import compiler
@dsl.pipeline(name='my-pipeline')
def pipeline():
...
compiler.Compiler().compile(pipeline,
'path')
Component authors: libraries with dependencies on KFP (e.g. GCPC)
Background
Previously on KFP SDK v1.x, we had two modes of import, signaling two different compilers with different compilation results.
import kfp
imports KFP v1 and v2-compatible mode compilerimport kfp.v2
imports KFP v2 mode compilerTwo modes of import are confusing to the users. Although users are in SDK v1.x, they have
kfp
andkfp.v2
to choose from, where normally the package name (kfp) indicates the default versioning.As KFP SDK evolves to v2.0 version, we want to set a standard way of importing KFP namespace, for easier usage and also cleaner code for maintenance.
Proposed Namespace for KFP SDK v2
Since the package name indicates the default versioning, we propose in KFP v2 and possible future iterations, we will always use
kfp
as the official namespace.import kfp
imports KFP v2 mode compilerFor v1-related features, users need to go back to SDK v1.x and use
import kfp
.In this way, users don't need to change imports when they are experiencing major version updates.
For existing GA customers, we will provide an alias of
kfp.v2
tokfp
, and throw a warning if user uses kfp.v2. Full set of warnings will be documented in the migration guide.Note:
v2-compatible mode was launched as an experimental feature, so it won't appear in v2 SDK and follows cloud deprecation policy.
For KFP SDK v1.x features, we will maintain it for 1 year after GA of SDK v2.0. After that, we will be providing security patches and major bug fixes for any bug that results in user code breaking until usage on GCP (Vertex and KFP) is 0.
User Impact on Namespace
Note: there are other changes suggested for Vertex Pipeline users which will be documented in the migration doc.
The text was updated successfully, but these errors were encountered: