Skip to content

Commit 33db128

Browse files
jsondaiGoogle Cloud Pipeline Components maintainers
authored andcommitted
feat(components): Move ModelImportEvaluationOp component to preview namespace
PiperOrigin-RevId: 628459625
1 parent efefe34 commit 33db128

14 files changed

+37
-55
lines changed

components/google-cloud/RELEASE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Use larger base reward model when tuning `text-bison@001`, `chat-bison@001` and `t5-xxl` with the `preview.llm.rlhf_pipeline`.
55
* Move `preview.model_evaluation.autosxs_pipeline` to `v1.model_evaluation.autosxs_pipeline`.
66
* Remove default prediction column names in `v1.model_evaluation.classification_component` component to fix pipeline errors when using bigquery data source.
7+
* Move `_implementation.model_evaluation.ModelImportEvaluationOp` component to preview namespace `preview.model_evaluation.ModelImportEvaluationOp`.
78
* Drop support for Python 3.7 since it has reached end-of-life.
89
* Expand number of regions supported by `preview.llm.rlhf_pipeline`.
910
* Apply latest GCPC image vulnerability resolutions (base OS and software updates).

components/google-cloud/google_cloud_pipeline_components/_implementation/model_evaluation/__init__.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,18 @@
2525
from google_cloud_pipeline_components._implementation.model_evaluation.feature_attribution.feature_attribution_graph_component import feature_attribution_graph_component as FeatureAttributionGraphComponentOp
2626
from google_cloud_pipeline_components._implementation.model_evaluation.feature_extractor.component import feature_extractor_error_analysis as FeatureExtractorOp
2727
from google_cloud_pipeline_components._implementation.model_evaluation.import_evaluated_annotation.component import evaluated_annotation_import as ModelImportEvaluatedAnnotationOp
28-
from google_cloud_pipeline_components._implementation.model_evaluation.import_evaluation.component import model_evaluation_import as ModelImportEvaluationOp
2928
from google_cloud_pipeline_components._implementation.model_evaluation.llm_classification_postprocessor.component import llm_classification_predictions_postprocessor_graph_component as LLMEvaluationClassificationPredictionsPostprocessorOp
30-
from google_cloud_pipeline_components._implementation.model_evaluation.llm_embedding.evaluation_llm_embedding_pipeline import evaluation_llm_embedding_pipeline
3129
from google_cloud_pipeline_components._implementation.model_evaluation.llm_embedding_retrieval.component import llm_embedding_retrieval as LLMEmbeddingRetrievalOp
3230
from google_cloud_pipeline_components._implementation.model_evaluation.llm_evaluation.component import model_evaluation_text_generation as LLMEvaluationTextGenerationOp
3331
from google_cloud_pipeline_components._implementation.model_evaluation.llm_evaluation_preprocessor.component import llm_evaluation_dataset_preprocessor_graph_component as LLMEvaluationPreprocessorOp
3432
from google_cloud_pipeline_components._implementation.model_evaluation.llm_information_retrieval_preprocessor.component import llm_information_retrieval_preprocessor as LLMInformationRetrievalPreprocessorOp
3533
from google_cloud_pipeline_components._implementation.model_evaluation.llm_retrieval_metrics.component import llm_retrieval_metrics as LLMRetrievalMetricsOp
3634
from google_cloud_pipeline_components._implementation.model_evaluation.llm_safety_bias.component import llm_safety_bias_metrics as LLMSafetyBiasMetricsOp
37-
from google_cloud_pipeline_components._implementation.model_evaluation.llm_safety_bias.evaluation_llm_safety_bias_pipeline import evaluation_llm_safety_bias_pipeline
38-
from google_cloud_pipeline_components._implementation.model_evaluation.model_inference.component import model_inference_and_evaluation_component
39-
from google_cloud_pipeline_components._implementation.model_evaluation.model_inference.component import model_inference_component
4035
from google_cloud_pipeline_components._implementation.model_evaluation.model_name_preprocessor.component import model_name_preprocessor as ModelNamePreprocessorOp
4136
from google_cloud_pipeline_components._implementation.model_evaluation.target_field_data_remover.component import target_field_data_remover as TargetFieldDataRemoverOp
42-
from google_cloud_pipeline_components._implementation.model_evaluation.text2sql.evaluation_llm_text2sql_pipeline import evaluation_llm_text2sql_pipeline
4337

4438

4539
__all__ = [
46-
'evaluation_llm_safety_bias_pipeline',
47-
'evaluation_llm_embedding_pipeline',
48-
'evaluation_llm_text2sql_pipeline',
4940
'evaluation_llm_endpoint_batch_predict_pipeline_graph_component',
5041
'ChunkingOp',
5142
'EvaluationDataSamplerOp',
@@ -63,9 +54,6 @@
6354
'LLMSafetyBiasMetricsOp',
6455
'ModelEvaluationFeatureAttributionOp',
6556
'ModelImportEvaluatedAnnotationOp',
66-
'ModelImportEvaluationOp',
6757
'ModelNamePreprocessorOp',
6858
'TargetFieldDataRemoverOp',
69-
'model_inference_component',
70-
'model_inference_and_evaluation_component',
7159
]

components/google-cloud/google_cloud_pipeline_components/_implementation/model_evaluation/import_evaluation/__init__.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

components/google-cloud/google_cloud_pipeline_components/_implementation/model_evaluation/llm_embedding/evaluation_llm_embedding_pipeline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
"""LLM embedding evaluation pipeline based on information retrieval (IR) task."""
1515

1616
from typing import Dict, Optional, Union
17+
1718
from google_cloud_pipeline_components._implementation.model_evaluation.endpoint_batch_predict.component import evaluation_llm_endpoint_batch_predict_pipeline_graph_component as LLMEndpointBatchPredictOp
18-
from google_cloud_pipeline_components._implementation.model_evaluation.import_evaluation.component import model_evaluation_import as ModelImportEvaluationOp
1919
from google_cloud_pipeline_components._implementation.model_evaluation.llm_embedding_retrieval.component import llm_embedding_retrieval as LLMEmbeddingRetrievalOp
2020
from google_cloud_pipeline_components._implementation.model_evaluation.llm_information_retrieval_preprocessor.component import llm_information_retrieval_preprocessor as LLMInformationRetrievalPreprocessorOp
2121
from google_cloud_pipeline_components._implementation.model_evaluation.llm_retrieval_metrics.component import llm_retrieval_metrics as LLMRetrievalMetricsOp
22+
from google_cloud_pipeline_components.preview.model_evaluation.model_evaluation_import_component import model_evaluation_import as ModelImportEvaluationOp
2223
from google_cloud_pipeline_components.types.artifact_types import VertexModel
2324
from google_cloud_pipeline_components.v1.batch_predict_job import ModelBatchPredictOp
2425
import kfp

components/google-cloud/google_cloud_pipeline_components/preview/model_evaluation/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021 The Kubeflow Authors. All Rights Reserved.
1+
# Copyright 2024 The Kubeflow Authors. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -17,10 +17,12 @@
1717
from google_cloud_pipeline_components.preview.model_evaluation.feature_attribution_component import feature_attribution as ModelEvaluationFeatureAttributionOp
1818
from google_cloud_pipeline_components.preview.model_evaluation.feature_attribution_graph_component import feature_attribution_graph_component as FeatureAttributionGraphComponentOp
1919
from google_cloud_pipeline_components.preview.model_evaluation.model_bias_component import detect_model_bias as DetectModelBiasOp
20+
from google_cloud_pipeline_components.preview.model_evaluation.model_evaluation_import_component import model_evaluation_import as ModelImportEvaluationOp
2021
from google_cloud_pipeline_components.v1.model_evaluation.evaluation_llm_classification_pipeline import evaluation_llm_classification_pipeline
2122
from google_cloud_pipeline_components.v1.model_evaluation.evaluation_llm_text_generation_pipeline import evaluation_llm_text_generation_pipeline
2223
from google_cloud_pipeline_components.v1.model_evaluation.model_based_llm_evaluation.autosxs.autosxs_pipeline import autosxs_pipeline
2324

25+
2426
__all__ = [
2527
'autosxs_pipeline',
2628
'evaluation_llm_classification_pipeline',
@@ -29,4 +31,5 @@
2931
'FeatureAttributionGraphComponentOp',
3032
'DetectModelBiasOp',
3133
'DetectDataBiasOp',
34+
'ModelImportEvaluationOp',
3235
]
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 The Kubeflow Authors. All Rights Reserved.
1+
# Copyright 2024 The Kubeflow Authors. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -53,8 +53,9 @@ def model_evaluation_import(
5353
5454
For more details, see
5555
https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.models.evaluations
56-
One of the four metrics inputs must be provided, metrics & problem_type,
57-
classification_metrics, regression_metrics, or forecasting_metrics.
56+
One of the metrics inputs must be provided, metrics & problem_type,
57+
classification_metrics, regression_metrics, or forecasting_metrics, text_generation_metrics,
58+
question_answering_metrics, summarization_metrics, embedding_metrics.
5859
5960
Args:
6061
model: Vertex model resource that will be the parent resource of the

components/google-cloud/google_cloud_pipeline_components/v1/model_evaluation/error_analysis_pipeline.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 The Kubeflow Authors. All Rights Reserved.
1+
# Copyright 2024 The Kubeflow Authors. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
2121
from google_cloud_pipeline_components._implementation.model_evaluation import EvaluationDatasetPreprocessorOp as DatasetPreprocessorOp
2222
from google_cloud_pipeline_components._implementation.model_evaluation import FeatureExtractorOp
2323
from google_cloud_pipeline_components._implementation.model_evaluation import ModelImportEvaluatedAnnotationOp
24-
from google_cloud_pipeline_components._implementation.model_evaluation import ModelImportEvaluationOp
24+
from google_cloud_pipeline_components.preview.model_evaluation.model_evaluation_import_component import model_evaluation_import as ModelImportEvaluationOp
2525
from google_cloud_pipeline_components.v1.batch_predict_job import ModelBatchPredictOp
2626
from google_cloud_pipeline_components.v1.dataset import GetVertexDatasetOp
2727
from google_cloud_pipeline_components.v1.model_evaluation.classification_component import model_evaluation_classification as ModelEvaluationClassificationOp
@@ -224,14 +224,12 @@ def vision_model_error_analysis_pipeline( # pylint: disable=dangerous-default-v
224224
)
225225

226226
with dsl.Condition(
227-
(
228-
(
229-
test_dataset_resource_name == ''
230-
and training_dataset_resource_name == ''
231-
and test_dataset_annotation_set_name == ''
232-
and training_dataset_annotation_set_name == ''
233-
)
234-
),
227+
((
228+
test_dataset_resource_name == ''
229+
and training_dataset_resource_name == ''
230+
and test_dataset_annotation_set_name == ''
231+
and training_dataset_annotation_set_name == ''
232+
)),
235233
name='CustomDataset',
236234
):
237235
dataset_preprocessor_task = DatasetPreprocessorOp(

components/google-cloud/google_cloud_pipeline_components/v1/model_evaluation/evaluated_annotation_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 The Kubeflow Authors. All Rights Reserved.
1+
# Copyright 2024 The Kubeflow Authors. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
1919
from google_cloud_pipeline_components._implementation.model_evaluation import EvaluatedAnnotationOp
2020
from google_cloud_pipeline_components._implementation.model_evaluation import EvaluationDatasetPreprocessorOp as DatasetPreprocessorOp
2121
from google_cloud_pipeline_components._implementation.model_evaluation import ModelImportEvaluatedAnnotationOp
22-
from google_cloud_pipeline_components._implementation.model_evaluation import ModelImportEvaluationOp
22+
from google_cloud_pipeline_components.preview.model_evaluation.model_evaluation_import_component import model_evaluation_import as ModelImportEvaluationOp
2323
from google_cloud_pipeline_components.v1.batch_predict_job import ModelBatchPredictOp
2424
from google_cloud_pipeline_components.v1.dataset import GetVertexDatasetOp
2525
from google_cloud_pipeline_components.v1.model_evaluation.classification_component import model_evaluation_classification as ModelEvaluationClassificationOp

components/google-cloud/google_cloud_pipeline_components/v1/model_evaluation/evaluation_automl_tabular_feature_attribution_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 The Kubeflow Authors. All Rights Reserved.
1+
# Copyright 2024 The Kubeflow Authors. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
1717
from google_cloud_pipeline_components import _placeholders
1818
from google_cloud_pipeline_components._implementation.model import GetVertexModelOp
1919
from google_cloud_pipeline_components._implementation.model_evaluation import FeatureAttributionGraphComponentOp
20-
from google_cloud_pipeline_components._implementation.model_evaluation import ModelImportEvaluationOp
20+
from google_cloud_pipeline_components.preview.model_evaluation.model_evaluation_import_component import model_evaluation_import as ModelImportEvaluationOp
2121
from google_cloud_pipeline_components.types.artifact_types import ClassificationMetrics
2222
from google_cloud_pipeline_components.types.artifact_types import RegressionMetrics
2323
from google_cloud_pipeline_components.v1.batch_predict_job import ModelBatchPredictOp

components/google-cloud/google_cloud_pipeline_components/v1/model_evaluation/evaluation_automl_tabular_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 The Kubeflow Authors. All Rights Reserved.
1+
# Copyright 2024 The Kubeflow Authors. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
1616

1717
from google_cloud_pipeline_components import _placeholders
1818
from google_cloud_pipeline_components._implementation.model import GetVertexModelOp
19-
from google_cloud_pipeline_components._implementation.model_evaluation import ModelImportEvaluationOp
19+
from google_cloud_pipeline_components.preview.model_evaluation.model_evaluation_import_component import model_evaluation_import as ModelImportEvaluationOp
2020
from google_cloud_pipeline_components.types.artifact_types import ClassificationMetrics
2121
from google_cloud_pipeline_components.types.artifact_types import RegressionMetrics
2222
from google_cloud_pipeline_components.v1.batch_predict_job import ModelBatchPredictOp

0 commit comments

Comments
 (0)