<commit_before># Kubeflow Pipelines v2

There are two modes Kubeflow Pipelines (KFP) v2 can run in:

* v2 compatible -- supports core v2 features in KFP v1
* v2 (v2 engine) -- full feature v2 in KFP v2's new architecture

Code for both modes live inside this folder.

## Kubeflow Pipelines v2 compatible

Status: [Beta](../docs/release/feature-stages.md#beta)
Documentation: [Introducing Kubeflow Pipelines SDK v2](https://www.kubeflow.org/docs/components/pipelines/sdk/v2/v2-compatibility/)
[Known Caveats & breaking changes](https://github.com/kubeflow/pipelines/issues/6133)
Design: [bit.ly/kfp-v2-compatible](https://bit.ly/kfp-v2-compatible)
Github Project: [KFP v2 compatible mode project](https://github.com/kubeflow/pipelines/projects/13)

Plan:

* [x] 2021 late May - first release
* [ ] 2021 early August (delayed from mid July) - feature complete

## Kubeflow Pipelines v2 engine

Status: not released (WIP)
Design: [bit.ly/kfp-v2](https://bit.ly/kfp-v2) (You need to join [kubeflow-discuss google group](https://groups.google.com/g/kubeflow-discuss) to get access.)
Github Project: [KFP v2 project](https://github.com/kubeflow/pipelines/projects/9)
Tracker Issue: [KFP v2 tracker](https://github.com/kubeflow/pipelines/issues/6110)

Plan:

* [ ] 2021 October - Alpha release
* [ ] TBD - Beta/Stable release

## Developing

### Developing KFP v2 compatible

Prerequisites:

* Install a KFP standalone instance on Google Cloud:

    This does not currently work on other envs, because some tests use GCS & GCS client.
    Welcome contributions to make it portable.

* Configure your own container registry for LAUNCHER_IMAGE_DEV in `.env`:

    ```bash
    export PROJECT=<my-project>
    # .env is a Makefile local config (ignored by git)
    echo "DEV_IMAGE_PREFIX=gcr.io/${PROJECT}/dev/kfp-" > .env
    ```

* Configure sample tests to use your dev image:

    ```bash
    export KFP_LAUNCHER_IMAGE=gcr.io/${PROJECT}/dev/kfp-launcher
    # consider putting this in your .bashrc or .zshrc to persist it.
    ```

Instructions:

1. Build launcher image locally and push to your own registry:

    ```bash
    make image-launcher-dev
    ```

1. Run one sample test:

    ```bash
    python -m samples.path.to.sample_test
    ```

    Read [v2 sample test documentation](./test/README.md) for more details.

### Developing KFP v2

Prerequisites:

* Install go, python, kfp pypi package, docker.

* Configure dev environment by creating a config file called `.env` in this folder,<commit_msg>docs: v2 compatible release instructions (#6267)<commit_after># Kubeflow Pipelines v2

There are two modes Kubeflow Pipelines (KFP) v2 can run in:

* v2 compatible -- supports core v2 features in KFP v1
* v2 (v2 engine) -- full feature v2 in KFP v2's new architecture

Code for both modes live inside this folder.

## Kubeflow Pipelines v2 compatible

Status: [Beta](../docs/release/feature-stages.md#beta)
Documentation: [Introducing Kubeflow Pipelines SDK v2](https://www.kubeflow.org/docs/components/pipelines/sdk/v2/v2-compatibility/)
[Known Caveats & breaking changes](https://github.com/kubeflow/pipelines/issues/6133)
Design: [bit.ly/kfp-v2-compatible](https://bit.ly/kfp-v2-compatible)
Github Project: [KFP v2 compatible mode project](https://github.com/kubeflow/pipelines/projects/13)

Plan:

* [x] 2021 late May - first release
* [ ] 2021 early August (delayed from mid July) - feature complete

## Kubeflow Pipelines v2 engine

Status: not released (WIP)
Design: [bit.ly/kfp-v2](https://bit.ly/kfp-v2) (You need to join [kubeflow-discuss google group](https://groups.google.com/g/kubeflow-discuss) to get access.)
Github Project: [KFP v2 project](https://github.com/kubeflow/pipelines/projects/9)
Tracker Issue: [KFP v2 tracker](https://github.com/kubeflow/pipelines/issues/6110)

Plan:

* [ ] 2021 October - Alpha release
* [ ] TBD - Beta/Stable release

## Developing

### Developing KFP v2 compatible

Prerequisites:

* Install a KFP standalone instance on Google Cloud:

    This does not currently work on other envs, because some tests use GCS & GCS client.
    Welcome contributions to make it portable.

* Install [ko](https://github.com/google/ko) CLI tool:

    ```bash
    make install-ko
    ```

* Configure your own container registry for LAUNCHER_IMAGE_DEV in `.env`:

    ```bash
    export PROJECT=<my-project>
    # .env is a Makefile local config (ignored by git)
    echo "DEV_IMAGE_PREFIX=gcr.io/${PROJECT}/dev/kfp-" > .env
    ```

* Configure sample tests to use your dev image:

    ```bash
    export KFP_LAUNCHER_IMAGE=gcr.io/${PROJECT}/dev/kfp-launcher
    # consider putting this in your .bashrc or .zshrc to persist it.
    ```

Instructions:

1. Build launcher image locally and push to your own registry:

    ```bash
    make image-launcher-dev
    ```

1. Run one sample test:

    ```bash
    python -m samples.path.to.sample_test
    ```

    Read [v2 sample test documentation](./test/README.md) for more details.

### Releasing KFP v2 compatible image

1. Build & release gcr.io/ml-pipeline/kfp-launcher:$TAG_NAME (this step needs write permission to gcr.io/ml-pipeline):

    ```bash
    # login locally
    gcloud auth login
    gcloud auth configure-docker

    cd kubeflow/pipelines/v2
    TAG_NAME=1.6.0
    LAUNCHER_IMAGE="gcr.io/ml-pipeline/kfp-launcher:${TAG_NAME}" make push-launcher
    ```

2. Edit [v2_compat.py](https://github.com/kubeflow/pipelines/blob/master/sdk/python/kfp/compiler/v2_compat.py#L26) -- pin _DEFAULT_LAUNCHER_IMAGE to the tag we will release.

3. Continue with KFP python SDK release instructions.

### Developing KFP v2

Prerequisites:

* Install go, python, kfp pypi package, docker.

* Install [ko](https://github.com/google/ko) CLI tool:

    ```bash
    make install-ko
    ```

* Configure dev environment by creating a config file called `.env` in this folder,
{'fraction_non_alphanumeric': 0.11660112839801676, 'fraction_numerical': 0.0196614805949735, 'mean_word_length': 3.7677261613691932, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 19, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2676539', 'n_tokens_mistral': 2074, 'n_tokens_neox': 1943, 'n_words': 586}