Sign inSign up

ml6team/kfp-components-add-serving-config

By ml6team

•Updated over 4 years ago

This component adds a serving config to a Model artifact

Image
0

1.3K

ml6team/kfp-components-add-serving-config repository overview

⁠Add-Serving-Config Component

⁠Description

This component adds a serving config to a Model artifact.

The reasoning here is, that the ModelUploadOp from google_cloud_pipeline_components⁠ expects this information in the artifact's metadata now.

Links:

⁠Component Definition

name: add-serving-config
description: |
    This component adds a serving config to a Model artifact.
    The reasoning here is, that the ModelUploadOp from google_cloud_pipeline_components expects this information
    in the artifact's metadata now.

    Args:
        model (Model):
            Required. The input Model artifact to which to add the serving config.
        serving_config (Dict):
            Required. A serving config is a dictionary of the form:
            serving_config={"containerSpec": container_spec}.
            The container spec follows: https://cloud.google.com/vertex-ai/docs/reference/rest/v1/ModelContainerSpec.
            Optionally the config can contain a "predictSchemata" key following:
            https://cloud.google.com/vertex-ai/docs/reference/rest/v1/PredictSchemata.
    Returns:
        configured_model (Artifact):
            An artifact corresponding to the input model artifact with the added serving configuration.
inputs:
    - {name: model, type: Model}
    - {name: serving_config, type: JsonObject}
outputs:
    - {name: configured_model, type: Artifact}
implementation:
    container:
        image: ml6team/kfp-components-add-serving-config:{{ tag }}
        command:
          - python
          - -m
          - kfp.v2.components.executor_main
          - --component_module_path
          - main.py
        args:
          - --executor_input
          - executorInput: null
          - --function_to_execute
          - component

Tag summary

Content type

Image

Digest

Size

70.3 MB

Last updated

over 4 years ago

docker pull ml6team/kfp-components-add-serving-config