google-cloud-pipeline-components 2.12.0__py3-none-any.whl → 2.13.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of google-cloud-pipeline-components might be problematic. Click here for more details.

@@ -55,11 +55,6 @@ def pipeline(
55
55
  endpoint_resource_name: Path the Online Prediction Endpoint. This will be an empty string if the model was not deployed.
56
56
  """
57
57
  # fmt: on
58
- adapter_artifact = kfp.dsl.importer(
59
- artifact_uri=output_adapter_path,
60
- artifact_class=kfp.dsl.Artifact,
61
- ).set_display_name('Import Tuned Adapter')
62
-
63
58
  regional_endpoint = function_based.resolve_regional_endpoint(
64
59
  upload_location=upload_location
65
60
  ).set_display_name('Resolve Regional Endpoint')
@@ -86,7 +81,7 @@ def pipeline(
86
81
  project=_placeholders.PROJECT_ID_PLACEHOLDER,
87
82
  location=upload_location,
88
83
  regional_endpoint=regional_endpoint.output,
89
- artifact_uri=adapter_artifact.output,
84
+ artifact_uri=output_adapter_path,
90
85
  model_display_name=display_name.output,
91
86
  model_reference_name=large_model_reference,
92
87
  upload_model=upload_model.output,
@@ -19,7 +19,7 @@ from google_cloud_pipeline_components._implementation.llm.generated import refin
19
19
 
20
20
 
21
21
  def get_private_image_tag() -> str:
22
- return os.getenv('PRIVATE_IMAGE_TAG') or refined_image_versions.IMAGE_TAG
22
+ return os.getenv('PRIVATE_IMAGE_TAG') or '20240330_0352_RC00'
23
23
 
24
24
 
25
25
  def get_autosxs_image_tag() -> str:
@@ -278,6 +278,15 @@ def resolve_reference_model_metadata(
278
278
  reward_model_path='gs://vertex-rlhf-restricted/pretrained_models/palm/t5x_otter_pretrain/',
279
279
  is_supported=True,
280
280
  ),
281
+ 'text-bison@002': reference_model_metadata(
282
+ large_model_reference='BISON_002',
283
+ reference_model_path=(
284
+ 'gs://vertex-rlhf-restricted/pretrained_models/palm/t5x_bison_002/'
285
+ ),
286
+ reward_model_reference='BISON_002',
287
+ reward_model_path='gs://vertex-rlhf-restricted/pretrained_models/palm/t5x_bison_002/',
288
+ is_supported=True,
289
+ ),
281
290
  'chat-bison@001': reference_model_metadata(
282
291
  large_model_reference='BISON',
283
292
  reference_model_path=(
@@ -444,7 +453,7 @@ def resolve_deploy_model(
444
453
  deploy_model: bool, large_model_reference: str
445
454
  ) -> bool:
446
455
  """Resolves runtime parameter that determines whether the tuned model should be deployed."""
447
- supported_models = {'BISON'}
456
+ supported_models = {'BISON', 'BISON_002'}
448
457
  if deploy_model and large_model_reference in supported_models:
449
458
  return True
450
459
  return False
@@ -468,7 +477,7 @@ def value_exists(value: Optional[str] = None) -> bool:
468
477
  @dsl.component(base_image=_image.GCPC_IMAGE_TAG, install_kfp_package=False)
469
478
  def resolve_upload_model(large_model_reference: str) -> bool:
470
479
  """Returns whether the model should be uploaded."""
471
- supported_models = {'BISON'}
480
+ supported_models = {'BISON', 'BISON_002'}
472
481
  if large_model_reference in supported_models:
473
482
  return True
474
483
  return False
@@ -26,7 +26,7 @@ from kfp import dsl
26
26
  def refined_upload_llm_model(
27
27
  project: str,
28
28
  location: str,
29
- artifact_uri: dsl.Input[dsl.Artifact],
29
+ artifact_uri: str,
30
30
  model_reference_name: str,
31
31
  model_display_name: str,
32
32
  regional_endpoint: str,
@@ -41,7 +41,7 @@ def refined_upload_llm_model(
41
41
  Args:
42
42
  project: Name of the GCP project.
43
43
  location: Location for model upload and deployment.
44
- artifact_uri: KFP Artifact for adapter.
44
+ artifact_uri: Path to the artifact to upload.
45
45
  model_reference_name: Large model reference name.
46
46
  model_display_name: Name of the model (shown in Model Registry).
47
47
  regional_endpoint: Regional API endpoint.
@@ -88,7 +88,7 @@ def refined_upload_llm_model(
88
88
  'largeModelReference': {'name': model_reference_name},
89
89
  'labels': labels,
90
90
  'generatedModelSource': {'genie_source': {'base_model_uri': ''}},
91
- 'artifactUri': artifact_uri.uri,
91
+ 'artifactUri': artifact_uri,
92
92
  }
93
93
  }
94
94
  if encryption_spec_key_name:
@@ -39,9 +39,9 @@ def autosxs_pipeline(
39
39
  evaluation_dataset: str,
40
40
  task: str,
41
41
  id_columns: List[str],
42
+ autorater_prompt_parameters: Dict[str, Dict[str, str]],
42
43
  model_a: str = '',
43
44
  model_b: str = '',
44
- autorater_prompt_parameters: Dict[str, Dict[str, str]] = {},
45
45
  model_a_prompt_parameters: Dict[str, Dict[str, str]] = {},
46
46
  model_b_prompt_parameters: Dict[str, Dict[str, str]] = {},
47
47
  response_column_a: str = '',
@@ -63,9 +63,9 @@ def autosxs_pipeline(
63
63
  evaluation_dataset: A BigQuery table or comma-separated list of GCS paths to a JSONL dataset containing evaluation examples.
64
64
  task: Evaluation task in the form `{task}@{version}`. task can be one of `[summarization, question_answering]`. Version is an integer with 3 digits or "latest". Ex: `summarization@001` or `question_answering@latest`.
65
65
  id_columns: The columns which distinguish unique evaluation examples.
66
+ autorater_prompt_parameters: Map of autorater prompt parameters to columns or templates. The expected parameters are: `inference_instruction` (details on how to perform a task) and `inference_context` (content to reference to perform the task). As an example, `{'inference_context': {'column': 'my_prompt'}}` uses the evaluation dataset's `my_prompt` column for the AutoRater's context.
66
67
  model_a: A fully-qualified model resource name (`projects/{project}/locations/{location}/models/{model}@{version}`) or publisher model resource name (`publishers/{publisher}/models/{model}`). This parameter is optional if Model A responses are specified.
67
68
  model_b: A fully-qualified model resource name (`projects/{project}/locations/{location}/models/{model}@{version}`) or publisher model resource name (`publishers/{publisher}/models/{model}`). This parameter is optional if Model B responses are specified.
68
- autorater_prompt_parameters: Map of autorater prompt parameters to columns or templates. The expected parameters are: `inference_instruction` (details on how to perform a task) and `inference_context` (content to reference to perform the task). As an example, `{'inference_context': {'column': 'my_prompt'}}` uses the evaluation dataset's `my_prompt` column for the AutoRater's context.
69
69
  model_a_prompt_parameters: Map of Model A prompt template parameters to columns or templates. This parameter is optional if Model A predictions are predefined. Example - `{'prompt': {'column': 'my_prompt'}}` uses the evaluation dataset's `my_prompt` column for the prompt parameter named `prompt`.
70
70
  model_b_prompt_parameters: Map of Model B prompt template parameters to columns or templates. This parameter is optional if Model B predictions are predefined. Example - `{'prompt': {'column': 'my_prompt'}}` uses the evaluation dataset's `my_prompt` column for the prompt parameter named `prompt`.
71
71
  response_column_a: Either the name of a column in the evaluation dataset containing predefined predictions, or the name of the column in the Model A output containing predictions. If no value is provided, the correct model output column name will attempt to be inferred.
@@ -15,8 +15,9 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
15
15
 
16
16
 
17
17
  DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
18
- b'\n\x13template_metadata.proto\x12\x11template_metadata\x1a\x1cgoogle/protobuf/struct.proto"F\n\x10TemplateMetadata\x12\x32\n\x0bio_metadata\x18\x01'
19
- b' \x01(\x0b\x32\x1d.template_metadata.IOMetadata"L\n\nIOMetadata\x12&\n\x05pages\x18\x01'
18
+ b'\n\x13template_metadata.proto\x12\x11template_metadata\x1a\x1cgoogle/protobuf/struct.proto"\x89\x01\n\x10TemplateMetadata\x12\x32\n\x0bio_metadata\x18\x01'
19
+ b' \x01(\x0b\x32\x1d.template_metadata.IOMetadata\x12\x41\n\x15preflight_validations\x18\x02'
20
+ b' \x01(\x0b\x32".template_metadata.ValidationItems"L\n\nIOMetadata\x12&\n\x05pages\x18\x01'
20
21
  b' \x03(\x0b\x32\x17.template_metadata.Page\x12\x16\n\x0eschema_version\x18\x02'
21
22
  b' \x01(\t"W\n\x04Page\x12\x0c\n\x04name\x18\x01'
22
23
  b' \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02'
@@ -24,11 +25,12 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
24
25
  b' \x03(\x0b\x32\x1a.template_metadata.Section"V\n\x07Section\x12\x0c\n\x04name\x18\x01'
25
26
  b' \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02'
26
27
  b' \x01(\t\x12(\n\x06inputs\x18\x03'
27
- b' \x03(\x0b\x32\x18.template_metadata.Input"\x9a\x01\n\x05Input\x12\x14\n\x0c\x64isplay_name\x18\x01'
28
- b' \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02'
29
- b' \x01(\t\x12\x1b\n\x13\x64\x65\x66\x61ult_explanation\x18\x03'
30
- b' \x01(\t\x12\x11\n\thelp_text\x18\x04'
31
- b' \x01(\t\x12\x36\n\rsemantic_type\x18\x05'
28
+ b' \x03(\x0b\x32\x18.template_metadata.Input"\xa8\x01\n\x05Input\x12\x0c\n\x04name\x18\x01'
29
+ b' \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02'
30
+ b' \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03'
31
+ b' \x01(\t\x12\x1b\n\x13\x64\x65\x66\x61ult_explanation\x18\x04'
32
+ b' \x01(\t\x12\x11\n\thelp_text\x18\x05'
33
+ b' \x01(\t\x12\x36\n\rsemantic_type\x18\x06'
32
34
  b' \x01(\x0b\x32\x1f.template_metadata.SemanticType"\xf6\x02\n\x0cSemanticType\x12.\n\nfloat_type\x18\x01'
33
35
  b' \x01(\x0b\x32\x18.template_metadata.FloatH\x00\x12\x32\n\x0cinteger_type\x18\x02'
34
36
  b' \x01(\x0b\x32\x1a.template_metadata.IntegerH\x00\x12\x30\n\x0bstring_type\x18\x03'
@@ -65,7 +67,18 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
65
67
  b' \x01(\x0b\x32\x1a.template_metadata.OptionsH\x00\x42\x08\n\x06values"U\n\x0bMachineType\x12\r\n\x03\x61ny\x18\x01'
66
68
  b' \x01(\x08H\x00\x12-\n\x07options\x18\x02'
67
69
  b' \x01(\x0b\x32\x1a.template_metadata.OptionsH\x00\x42\x08\n\x06values"1\n\x07Options\x12&\n\x06values\x18\x01'
68
- b' \x03(\x0b\x32\x16.google.protobuf.Value*G\n\x04Size\x12\x0e\n\nSIZE_UNSET\x10\x00\x12\x0e\n\nSIZE_SMALL\x10\x01\x12\x0f\n\x0bSIZE_MEDIUM\x10\x02\x12\x0e\n\nSIZE_LARGE\x10\x03*\x82\x01\n\x0b\x43ontentType\x12\x11\n\rUNSET_CONTENT\x10\x00\x12\x10\n\x0cYAML_CONTENT\x10\x01\x12\x10\n\x0cJSON_CONTENT\x10\x02\x12\x14\n\x10MARKDOWN_CONTENT\x10\x03\x12\x10\n\x0cHTML_CONTENT\x10\x04\x12\x14\n\x10\x44\x41TETIME_CONTENT\x10\x05*a\n\x07UriType\x12\x0b\n\x07\x41NY_URI\x10\x00\x12\x0f\n\x0bGCS_ANY_URI\x10\x01\x12\x12\n\x0eGCS_BUCKET_URI\x10\x02\x12\x12\n\x0eGCS_OBJECT_URI\x10\x03\x12\x10\n\x0c\x42IGQUERY_URI\x10\x04\x42\x02P\x01\x62\x06proto3'
70
+ b' \x03(\x0b\x32\x16.google.protobuf.Value"\x82\x02\n\x0fValidationItems\x12N\n\x0esa_validations\x18\x01'
71
+ b' \x03(\x0b\x32\x36.template_metadata.GoogleCloudServiceAccountValidation\x12O\n\x11quota_validations\x18\x02'
72
+ b' \x03(\x0b\x32\x34.template_metadata.GoogleCloudProjectQuotaValidation\x12N\n\x0f\x61pi_validations\x18\x03'
73
+ b' \x03(\x0b\x32\x35.template_metadata.GoogleCloudApiEnablementValidation"p\n!GoogleCloudProjectQuotaValidation\x12\x13\n\x0bmetric_name\x18\x01'
74
+ b' \x01(\t\x12\x15\n\x0bint64_value\x18\x02'
75
+ b' \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03'
76
+ b' \x01(\x01H\x00\x42\x07\n\x05value"\x8d\x01\n#GoogleCloudServiceAccountValidation\x12\x1f\n\x17\x64\x65\x66\x61ult_principal_email\x18\x01'
77
+ b' \x01(\t\x12\x1c\n\x14override_placeholder\x18\x02'
78
+ b' \x01(\t\x12\x13\n\x0bpermissions\x18\x03'
79
+ b' \x03(\t\x12\x12\n\nrole_names\x18\x04'
80
+ b' \x03(\t";\n"GoogleCloudApiEnablementValidation\x12\x15\n\rservice_names\x18\x01'
81
+ b' \x03(\t*G\n\x04Size\x12\x0e\n\nSIZE_UNSET\x10\x00\x12\x0e\n\nSIZE_SMALL\x10\x01\x12\x0f\n\x0bSIZE_MEDIUM\x10\x02\x12\x0e\n\nSIZE_LARGE\x10\x03*\x82\x01\n\x0b\x43ontentType\x12\x11\n\rUNSET_CONTENT\x10\x00\x12\x10\n\x0cYAML_CONTENT\x10\x01\x12\x10\n\x0cJSON_CONTENT\x10\x02\x12\x14\n\x10MARKDOWN_CONTENT\x10\x03\x12\x10\n\x0cHTML_CONTENT\x10\x04\x12\x14\n\x10\x44\x41TETIME_CONTENT\x10\x05*a\n\x07UriType\x12\x0b\n\x07\x41NY_URI\x10\x00\x12\x0f\n\x0bGCS_ANY_URI\x10\x01\x12\x12\n\x0eGCS_BUCKET_URI\x10\x02\x12\x12\n\x0eGCS_OBJECT_URI\x10\x03\x12\x10\n\x0c\x42IGQUERY_URI\x10\x04\x42\x02P\x01\x62\x06proto3'
69
82
  )
70
83
 
71
84
  _globals = globals()
@@ -78,48 +91,56 @@ _builder.BuildTopDescriptorsAndMessages(
78
91
  if not _descriptor._USE_C_DESCRIPTORS:
79
92
  _globals['DESCRIPTOR']._loaded_options = None
80
93
  _globals['DESCRIPTOR']._serialized_options = b'P\001'
81
- _globals['_SIZE']._serialized_start = 2225
82
- _globals['_SIZE']._serialized_end = 2296
83
- _globals['_CONTENTTYPE']._serialized_start = 2299
84
- _globals['_CONTENTTYPE']._serialized_end = 2429
85
- _globals['_URITYPE']._serialized_start = 2431
86
- _globals['_URITYPE']._serialized_end = 2528
87
- _globals['_TEMPLATEMETADATA']._serialized_start = 163
88
- _globals['_TEMPLATEMETADATA']._serialized_end = 233
89
- _globals['_IOMETADATA']._serialized_start = 235
90
- _globals['_IOMETADATA']._serialized_end = 311
91
- _globals['_PAGE']._serialized_start = 313
92
- _globals['_PAGE']._serialized_end = 400
93
- _globals['_SECTION']._serialized_start = 402
94
- _globals['_SECTION']._serialized_end = 488
95
- _globals['_INPUT']._serialized_start = 491
96
- _globals['_INPUT']._serialized_end = 645
97
- _globals['_SEMANTICTYPE']._serialized_start = 648
98
- _globals['_SEMANTICTYPE']._serialized_end = 1022
99
- _globals['_FLOAT']._serialized_start = 1024
100
- _globals['_FLOAT']._serialized_end = 1083
101
- _globals['_INTEGER']._serialized_start = 1085
102
- _globals['_INTEGER']._serialized_end = 1146
103
- _globals['_STRING']._serialized_start = 1149
104
- _globals['_STRING']._serialized_end = 1315
105
- _globals['_BOOLEAN']._serialized_start = 1317
106
- _globals['_BOOLEAN']._serialized_end = 1326
107
- _globals['_LIST']._serialized_start = 1329
108
- _globals['_LIST']._serialized_end = 1495
109
- _globals['_STRUCT']._serialized_start = 1497
110
- _globals['_STRUCT']._serialized_end = 1505
111
- _globals['_ARTIFACT']._serialized_start = 1507
112
- _globals['_ARTIFACT']._serialized_end = 1584
113
- _globals['_FREEFORM']._serialized_start = 1587
114
- _globals['_FREEFORM']._serialized_end = 1731
115
- _globals['_SELECTONE']._serialized_start = 1734
116
- _globals['_SELECTONE']._serialized_end = 1924
117
- _globals['_SELECTMANY']._serialized_start = 1926
118
- _globals['_SELECTMANY']._serialized_end = 2001
119
- _globals['_LOCATION']._serialized_start = 2003
120
- _globals['_LOCATION']._serialized_end = 2085
121
- _globals['_MACHINETYPE']._serialized_start = 2087
122
- _globals['_MACHINETYPE']._serialized_end = 2172
123
- _globals['_OPTIONS']._serialized_start = 2174
124
- _globals['_OPTIONS']._serialized_end = 2223
94
+ _globals['_SIZE']._serialized_start = 2887
95
+ _globals['_SIZE']._serialized_end = 2958
96
+ _globals['_CONTENTTYPE']._serialized_start = 2961
97
+ _globals['_CONTENTTYPE']._serialized_end = 3091
98
+ _globals['_URITYPE']._serialized_start = 3093
99
+ _globals['_URITYPE']._serialized_end = 3190
100
+ _globals['_TEMPLATEMETADATA']._serialized_start = 164
101
+ _globals['_TEMPLATEMETADATA']._serialized_end = 301
102
+ _globals['_IOMETADATA']._serialized_start = 303
103
+ _globals['_IOMETADATA']._serialized_end = 379
104
+ _globals['_PAGE']._serialized_start = 381
105
+ _globals['_PAGE']._serialized_end = 468
106
+ _globals['_SECTION']._serialized_start = 470
107
+ _globals['_SECTION']._serialized_end = 556
108
+ _globals['_INPUT']._serialized_start = 559
109
+ _globals['_INPUT']._serialized_end = 727
110
+ _globals['_SEMANTICTYPE']._serialized_start = 730
111
+ _globals['_SEMANTICTYPE']._serialized_end = 1104
112
+ _globals['_FLOAT']._serialized_start = 1106
113
+ _globals['_FLOAT']._serialized_end = 1165
114
+ _globals['_INTEGER']._serialized_start = 1167
115
+ _globals['_INTEGER']._serialized_end = 1228
116
+ _globals['_STRING']._serialized_start = 1231
117
+ _globals['_STRING']._serialized_end = 1397
118
+ _globals['_BOOLEAN']._serialized_start = 1399
119
+ _globals['_BOOLEAN']._serialized_end = 1408
120
+ _globals['_LIST']._serialized_start = 1411
121
+ _globals['_LIST']._serialized_end = 1577
122
+ _globals['_STRUCT']._serialized_start = 1579
123
+ _globals['_STRUCT']._serialized_end = 1587
124
+ _globals['_ARTIFACT']._serialized_start = 1589
125
+ _globals['_ARTIFACT']._serialized_end = 1666
126
+ _globals['_FREEFORM']._serialized_start = 1669
127
+ _globals['_FREEFORM']._serialized_end = 1813
128
+ _globals['_SELECTONE']._serialized_start = 1816
129
+ _globals['_SELECTONE']._serialized_end = 2006
130
+ _globals['_SELECTMANY']._serialized_start = 2008
131
+ _globals['_SELECTMANY']._serialized_end = 2083
132
+ _globals['_LOCATION']._serialized_start = 2085
133
+ _globals['_LOCATION']._serialized_end = 2167
134
+ _globals['_MACHINETYPE']._serialized_start = 2169
135
+ _globals['_MACHINETYPE']._serialized_end = 2254
136
+ _globals['_OPTIONS']._serialized_start = 2256
137
+ _globals['_OPTIONS']._serialized_end = 2305
138
+ _globals['_VALIDATIONITEMS']._serialized_start = 2308
139
+ _globals['_VALIDATIONITEMS']._serialized_end = 2566
140
+ _globals['_GOOGLECLOUDPROJECTQUOTAVALIDATION']._serialized_start = 2568
141
+ _globals['_GOOGLECLOUDPROJECTQUOTAVALIDATION']._serialized_end = 2680
142
+ _globals['_GOOGLECLOUDSERVICEACCOUNTVALIDATION']._serialized_start = 2683
143
+ _globals['_GOOGLECLOUDSERVICEACCOUNTVALIDATION']._serialized_end = 2824
144
+ _globals['_GOOGLECLOUDAPIENABLEMENTVALIDATION']._serialized_start = 2826
145
+ _globals['_GOOGLECLOUDAPIENABLEMENTVALIDATION']._serialized_end = 2885
125
146
  # @@protoc_insertion_point(module_scope)
@@ -176,9 +176,18 @@ def evaluation_llm_classification_pipeline( # pylint: disable=dangerous-default
176
176
  encryption_spec_key_name=encryption_spec_key_name,
177
177
  )
178
178
 
179
+ get_vertex_eval_model_task = dsl.importer(
180
+ artifact_uri=(
181
+ f'https://{location}-aiplatform.googleapis.com/v1/{model_name}'
182
+ ),
183
+ artifact_class=VertexModel,
184
+ metadata={'resourceName': model_name},
185
+ )
186
+ get_vertex_eval_model_task.set_display_name('get-vertex-eval-model')
187
+
179
188
  import_evaluation_task = ModelImportEvaluationOp(
180
189
  classification_metrics=eval_task.outputs['evaluation_metrics'],
181
- model=get_vertex_model_task.outputs['artifact'],
190
+ model=get_vertex_eval_model_task.outputs['artifact'],
182
191
  dataset_type=batch_predict_instances_format,
183
192
  dataset_paths=batch_predict_gcs_source_uris,
184
193
  display_name=evaluation_display_name,
@@ -34,7 +34,6 @@ def evaluation_llm_text_generation_pipeline( # pylint: disable=dangerous-defaul
34
34
  location: str,
35
35
  batch_predict_gcs_source_uris: List[str],
36
36
  batch_predict_gcs_destination_output_uri: str,
37
- service_account: str,
38
37
  model_name: str = 'publishers/google/models/text-bison@002',
39
38
  evaluation_task: str = 'text-generation',
40
39
  input_field_name: str = 'input_text',
@@ -44,6 +43,7 @@ def evaluation_llm_text_generation_pipeline( # pylint: disable=dangerous-defaul
44
43
  batch_predict_model_parameters: Dict[str, str] = {},
45
44
  enable_row_based_metrics: bool = False,
46
45
  machine_type: str = 'e2-standard-4',
46
+ service_account: str = '',
47
47
  network: str = '',
48
48
  encryption_spec_key_name: str = '',
49
49
  evaluation_display_name: str = 'evaluation-llm-text-generation-pipeline-{{$.pipeline_job_uuid}}',
@@ -72,7 +72,6 @@ def evaluation_llm_text_generation_pipeline( # pylint: disable=dangerous-defaul
72
72
  "output_text": "your ground truth output text"
73
73
  }
74
74
  batch_predict_gcs_destination_output_uri: Required. The Google Cloud Storage location of the directory where the eval pipeline output is to be written to.
75
- service_account: Required. Sets the default service account for workload run-as account. The service account running the pipeline (https://cloud.google.com/vertex-ai/docs/pipelines/configure-project#service-account) submitting jobs must have act-as permission on this run-as account.
76
75
  model_name: The Model name used to run evaluation. Must be a publisher Model or a managed Model sharing the same ancestor location. Starting this job has no impact on any existing deployments of the Model and their resources.
77
76
  evaluation_task: The task that the large language model will be evaluated on. The evaluation component computes a set of metrics relevant to that specific task. Currently supported tasks are: `summarization`, `question-answering`, `text-generation`.
78
77
  input_field_name: The field name of the input eval dataset instances that contains the input prompts to the LLM.
@@ -82,6 +81,7 @@ def evaluation_llm_text_generation_pipeline( # pylint: disable=dangerous-defaul
82
81
  batch_predict_model_parameters: A map of parameters that govern the predictions. Some acceptable parameters include: maxOutputTokens, topK, topP, and temperature.
83
82
  enable_row_based_metrics: Flag of if row based metrics is enabled, default value is false.
84
83
  machine_type: The machine type of this custom job. If not set, defaulted to `e2-standard-4`. More details: https://cloud.google.com/compute/docs/machine-resource
84
+ service_account: Sets the default service account for workload run-as account. The service account running the pipeline (https://cloud.google.com/vertex-ai/docs/pipelines/configure-project#service-account) submitting jobs must have act-as permission on this run-as account. If unspecified, the Vertex AI Custom Code Service Agent(https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) for the CustomJob's project.
85
85
  network: The full name of the Compute Engine network to which the job should be peered. For example, `projects/12345/global/networks/myVPC`. Format is of the form `projects/{project}/global/networks/{network}`. Where `{project}` is a project number, as in `12345`, and `{network}` is a network name, as in `myVPC`. To specify this field, you must have already configured VPC Network Peering for Vertex AI (https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If left unspecified, the job is not peered with any network.
86
86
  encryption_spec_key_name: Customer-managed encryption key options. If set, resources created by this pipeline will be encrypted with the provided encryption key. Has the form: `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created.
87
87
  evaluation_display_name: The display name of the uploaded evaluation resource to the Vertex AI model.
@@ -158,11 +158,20 @@ def evaluation_llm_text_generation_pipeline( # pylint: disable=dangerous-defaul
158
158
  encryption_spec_key_name=encryption_spec_key_name,
159
159
  )
160
160
 
161
+ get_vertex_eval_model_task = dsl.importer(
162
+ artifact_uri=(
163
+ f'https://{location}-aiplatform.googleapis.com/v1/{model_name}'
164
+ ),
165
+ artifact_class=VertexModel,
166
+ metadata={'resourceName': model_name},
167
+ )
168
+ get_vertex_eval_model_task.set_display_name('get-vertex-eval-model')
169
+
161
170
  with dsl.If(enable_row_based_metrics == True):
162
171
  import_evaluation_task_with_row_based_metrics = ModelImportEvaluationOp(
163
172
  metrics=eval_task.outputs['evaluation_metrics'],
164
173
  row_based_metrics=eval_task.outputs['row_based_metrics'],
165
- model=get_vertex_model_task.outputs['artifact'],
174
+ model=get_vertex_eval_model_task.outputs['artifact'],
166
175
  problem_type=evaluation_task,
167
176
  dataset_type=batch_predict_predictions_format,
168
177
  dataset_paths=batch_predict_gcs_source_uris,
@@ -171,7 +180,7 @@ def evaluation_llm_text_generation_pipeline( # pylint: disable=dangerous-defaul
171
180
  with dsl.Else():
172
181
  import_evaluation_task = ModelImportEvaluationOp(
173
182
  metrics=eval_task.outputs['evaluation_metrics'],
174
- model=get_vertex_model_task.outputs['artifact'],
183
+ model=get_vertex_eval_model_task.outputs['artifact'],
175
184
  problem_type=evaluation_task,
176
185
  dataset_type=batch_predict_predictions_format,
177
186
  dataset_paths=batch_predict_gcs_source_uris,
@@ -13,4 +13,4 @@
13
13
  # limitations under the License.
14
14
  """Google Cloud Pipeline Components version."""
15
15
 
16
- __version__ = "2.12.0"
16
+ __version__ = "2.13.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: google-cloud-pipeline-components
3
- Version: 2.12.0
3
+ Version: 2.13.1
4
4
  Summary: This SDK enables a set of First Party (Google owned) pipeline components that allow users to take their experience from Vertex AI SDK and other Google Cloud services and create a corresponding pipeline using KFP or Managed Pipelines.
5
5
  Home-page: https://github.com/kubeflow/pipelines/tree/master/components/google-cloud
6
6
  Author: The Google Cloud Pipeline Components authors
@@ -31,24 +31,25 @@ Classifier: Topic :: Software Development :: Libraries
31
31
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
32
32
  Requires-Python: >=3.7.0,<3.12.0
33
33
  Description-Content-Type: text/markdown
34
- Requires-Dist: google-api-core (!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5)
35
- Requires-Dist: kfp (<=2.7.0,>=2.6.0)
36
- Requires-Dist: google-cloud-aiplatform (<2,>=1.14.0)
37
- Requires-Dist: Jinja2 (<4,>=3.1.2)
34
+ License-File: LICENSE
35
+ Requires-Dist: google-api-core !=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5
36
+ Requires-Dist: kfp <=2.7.0,>=2.6.0
37
+ Requires-Dist: google-cloud-aiplatform <2,>=1.14.0
38
+ Requires-Dist: Jinja2 <4,>=3.1.2
38
39
  Provides-Extra: docs
39
- Requires-Dist: protobuf (<5,>=4.21.1) ; extra == 'docs'
40
- Requires-Dist: grpcio-status (<=1.47.0) ; extra == 'docs'
41
- Requires-Dist: commonmark (==0.9.1) ; extra == 'docs'
42
- Requires-Dist: autodocsumm (==0.2.9) ; extra == 'docs'
43
- Requires-Dist: sphinx (<6.0.0,>=5.0.2) ; extra == 'docs'
44
- Requires-Dist: sphinx-immaterial (==0.9.0) ; extra == 'docs'
45
- Requires-Dist: sphinx-rtd-theme (==2.0.0) ; extra == 'docs'
46
- Requires-Dist: m2r2 (==0.3.3.post2) ; extra == 'docs'
47
- Requires-Dist: sphinx-notfound-page (==0.8.3) ; extra == 'docs'
40
+ Requires-Dist: protobuf <5,>=4.21.1 ; extra == 'docs'
41
+ Requires-Dist: grpcio-status <=1.47.0 ; extra == 'docs'
42
+ Requires-Dist: commonmark ==0.9.1 ; extra == 'docs'
43
+ Requires-Dist: autodocsumm ==0.2.9 ; extra == 'docs'
44
+ Requires-Dist: sphinx <6.0.0,>=5.0.2 ; extra == 'docs'
45
+ Requires-Dist: sphinx-immaterial ==0.9.0 ; extra == 'docs'
46
+ Requires-Dist: sphinx-rtd-theme ==2.0.0 ; extra == 'docs'
47
+ Requires-Dist: m2r2 ==0.3.3.post2 ; extra == 'docs'
48
+ Requires-Dist: sphinx-notfound-page ==0.8.3 ; extra == 'docs'
48
49
  Provides-Extra: tests
49
- Requires-Dist: mock (>=4.0.0) ; extra == 'tests'
50
- Requires-Dist: flake8 (>=3.0.0) ; extra == 'tests'
51
- Requires-Dist: pytest (>=6.0.0) ; extra == 'tests'
50
+ Requires-Dist: mock >=4.0.0 ; extra == 'tests'
51
+ Requires-Dist: flake8 >=3.0.0 ; extra == 'tests'
52
+ Requires-Dist: pytest >=6.0.0 ; extra == 'tests'
52
53
 
53
54
  # Google Cloud Pipeline Components
54
55
 
@@ -2,15 +2,15 @@ google_cloud_pipeline_components/__init__.py,sha256=3Mr8_YbBkTzArlgPDkUKoMzoKHZx
2
2
  google_cloud_pipeline_components/_image.py,sha256=lANDYNk1WSuGZSoTTRcWdjsUvCkkA-PmwouTM9Et7fY,828
3
3
  google_cloud_pipeline_components/_placeholders.py,sha256=517N_NQthPEBFJtsy8NE3WkBJm_dmwmlXdYNtk5gH-c,1233
4
4
  google_cloud_pipeline_components/utils.py,sha256=9FG7umyEXhyUvtNeC46NuQ04olDMR3o-Wp78V1xs8GY,11045
5
- google_cloud_pipeline_components/version.py,sha256=NH1ZheZhE2081vUwDDmf6XB3U_sRDSXENrEAPZaux5E,678
5
+ google_cloud_pipeline_components/version.py,sha256=6tNJDHp5NYpbYbjFyHX68BAokEj_vJem_7m_7kOze30,678
6
6
  google_cloud_pipeline_components/_implementation/__init__.py,sha256=sb6SfJl6rt3AKjiWxd-KO9DSiZ3PzGZRcsqKuc1A2Cg,606
7
7
  google_cloud_pipeline_components/_implementation/llm/__init__.py,sha256=sb6SfJl6rt3AKjiWxd-KO9DSiZ3PzGZRcsqKuc1A2Cg,606
8
8
  google_cloud_pipeline_components/_implementation/llm/batch_prediction_pairwise.py,sha256=mARB-tDYFr0tpBrLCIh481H4LDuXdr_8UyKVUaOF5Cw,7569
9
9
  google_cloud_pipeline_components/_implementation/llm/bulk_inferrer.py,sha256=k-MHsyESWboHdNeRm9q3MOGwbtZr37QNGm_Y_cGsETA,3958
10
10
  google_cloud_pipeline_components/_implementation/llm/deploy_llm_model.py,sha256=Jjme37_M32AK1r_MmHMHZvW8k9LJiqfZ4eJEquWoTt4,5029
11
- google_cloud_pipeline_components/_implementation/llm/deployment_graph.py,sha256=Rpy_qVngv-uUmiEr_vhC8Xn0aw26ptK70cwAvDNkij0,5200
12
- google_cloud_pipeline_components/_implementation/llm/env.py,sha256=zY5glHO9oPWsALfYquR0euJHJnXbv2w-21mWVNit2Gw,1864
13
- google_cloud_pipeline_components/_implementation/llm/function_based.py,sha256=dggSFXOtzAreNThA9zDYk3qoRxs6Z9Z8i0XUwk3rGtg,18415
11
+ google_cloud_pipeline_components/_implementation/llm/deployment_graph.py,sha256=T6UgAco2Xk8Y0PjP5AfLSHSkE0V8m4OhrT4wTUdjGI4,5032
12
+ google_cloud_pipeline_components/_implementation/llm/env.py,sha256=cnzBS0-a2_T-w54T2E6RtshjbEg8CJuycqoIsVrOJZI,1852
13
+ google_cloud_pipeline_components/_implementation/llm/function_based.py,sha256=EPAY7uGukSfCJt9wkYOvXwJ_6WnkZBTBijYaMUCUcEg,18845
14
14
  google_cloud_pipeline_components/_implementation/llm/model_evaluation_text_generation_pairwise.py,sha256=W64FNFfbarOcDw1sSG9J-BQCVPUYx3zLAmwLhhGhth0,5102
15
15
  google_cloud_pipeline_components/_implementation/llm/online_evaluation_pairwise.py,sha256=khEli4fSoIQlaiReXOm3zsvsM7BIdbJOXFGUzjcvxOI,5299
16
16
  google_cloud_pipeline_components/_implementation/llm/preference_data_formatter.py,sha256=xqgvMsFgFIuiDAv3V3lf4XJSnLjZSTCHknGkmUcP9fs,5025
@@ -23,7 +23,7 @@ google_cloud_pipeline_components/_implementation/llm/reward_model_graph.py,sha25
23
23
  google_cloud_pipeline_components/_implementation/llm/reward_model_trainer.py,sha256=xkj2hnHpZMLutGNxoewTVUsRR2bkLNkVUhWwjY9EXKA,5596
24
24
  google_cloud_pipeline_components/_implementation/llm/rlhf_preprocessor.py,sha256=IqwZ2PXGOOfBNeDIp3exKeqPn6kGwaSaozJEr4cbhDs,2510
25
25
  google_cloud_pipeline_components/_implementation/llm/supervised_fine_tuner.py,sha256=5HzjhMXMRmaWGv3BlAi8lBg6MMlaaHlbqKez3ZcX5Ss,4951
26
- google_cloud_pipeline_components/_implementation/llm/upload_llm_model.py,sha256=e9LiGzrsIuLnPzfib9zT_bMbGxUUvFoZJNUO3Yiijaw,4742
26
+ google_cloud_pipeline_components/_implementation/llm/upload_llm_model.py,sha256=iLtHLtrXzDbRHbgOW99SA9XDdhr_8omhLX1bTP-tsaE,4724
27
27
  google_cloud_pipeline_components/_implementation/llm/upload_tensorboard_metrics.py,sha256=BN-0TQFl49TcE54ltBRt4iZYTjO7718eCLwHKR58ips,4010
28
28
  google_cloud_pipeline_components/_implementation/llm/utils.py,sha256=E250cmvw0QUnt8NLDl5crK6K1o1FguUglQIdBVqfwQI,5548
29
29
  google_cloud_pipeline_components/_implementation/llm/utils_test.py,sha256=co8gWyrowY5CpkFNsaLGQlD_gpIykkVI7czxIizp5cM,2864
@@ -338,11 +338,11 @@ google_cloud_pipeline_components/preview/model_evaluation/model_bias_component.p
338
338
  google_cloud_pipeline_components/preview/model_evaluation/utils.py,sha256=oRlEvA3zMSTzgxJklZD0A-BzFDx0-PsBHBXZ4kmaREY,7539
339
339
  google_cloud_pipeline_components/preview/model_evaluation/model_based_llm_evaluation/__init__.py,sha256=ee_EyGhwqXIjR3Rx9t-o2gV9TssU-VErMU7LtDA7s9k,838
340
340
  google_cloud_pipeline_components/preview/model_evaluation/model_based_llm_evaluation/autosxs/__init__.py,sha256=sb6SfJl6rt3AKjiWxd-KO9DSiZ3PzGZRcsqKuc1A2Cg,606
341
- google_cloud_pipeline_components/preview/model_evaluation/model_based_llm_evaluation/autosxs/autosxs_pipeline.py,sha256=Sw-OvuJnDId9l1kmpX6zgOA-nEskUV9EQ7rcHqShI9g,8856
341
+ google_cloud_pipeline_components/preview/model_evaluation/model_based_llm_evaluation/autosxs/autosxs_pipeline.py,sha256=Jzrd6sQsj0E_ECqsODJ-95dk85T6KgsITsvJh6qVpxc,8851
342
342
  google_cloud_pipeline_components/proto/__init__.py,sha256=aiPUc6gpQwG9cRTYfw3ChFCJfDr3vAIsm2eMYUDJjJQ,661
343
343
  google_cloud_pipeline_components/proto/gcp_resources_pb2.py,sha256=ssNNm4zjiWbuBUS7IH6kyrvvfmcC_Z5F7hOAuQe_YLk,2134
344
344
  google_cloud_pipeline_components/proto/preflight_validations_pb2.py,sha256=5MioLb12O4to8LYXFv-irH31BKot2LGtXvxOeXZSQlQ,2588
345
- google_cloud_pipeline_components/proto/template_metadata_pb2.py,sha256=chzvvNZj5XEvifJbN77L7ZJv7jta-4ycHUKjTLZYCAg,7773
345
+ google_cloud_pipeline_components/proto/template_metadata_pb2.py,sha256=RfVbgljtitUcLS9PX9dGbPpLYUdVqXNJS_mzUjPgtAg,9432
346
346
  google_cloud_pipeline_components/types/__init__.py,sha256=1WFkL49QEy-gNb6ywQOE4yZkD7DoULAeiL1tLdb3S28,606
347
347
  google_cloud_pipeline_components/types/artifact_types.py,sha256=zvwvzRuFb_s1VS1mtKkltOOACATJk-kG7dVFOUasfw4,23725
348
348
  google_cloud_pipeline_components/v1/__init__.py,sha256=E1Fie3Gq3KKLHEBGUUBeuao-Eo1uwuBfAWWhx2siwaE,765
@@ -515,16 +515,16 @@ google_cloud_pipeline_components/v1/model_evaluation/evaluation_automl_tabular_f
515
515
  google_cloud_pipeline_components/v1/model_evaluation/evaluation_automl_tabular_pipeline.py,sha256=p-GH_tVqffHwck5Sll0BHsnvVAHQk48WNAUohZxATcs,37108
516
516
  google_cloud_pipeline_components/v1/model_evaluation/evaluation_automl_unstructure_data_pipeline.py,sha256=aiZOK5BE5mdqJL3s4pU1Y_ynHvWBE9JIxl9UrJuNsco,42404
517
517
  google_cloud_pipeline_components/v1/model_evaluation/evaluation_feature_attribution_pipeline.py,sha256=ChDwHvPCn0prrK1FLvEhAbaTmA153M9NG3Wj3QIlNHs,51173
518
- google_cloud_pipeline_components/v1/model_evaluation/evaluation_llm_classification_pipeline.py,sha256=Vf_O-8VWKZlR_tCmFNNcQWp6VWK8c67IBWKxbt3ZQBg,11672
519
- google_cloud_pipeline_components/v1/model_evaluation/evaluation_llm_text_generation_pipeline.py,sha256=ufVZwpEerSLLo_yGJVh7cgBBTeL3RmkVuWKHkCiaQ9U,11056
518
+ google_cloud_pipeline_components/v1/model_evaluation/evaluation_llm_classification_pipeline.py,sha256=hwQrgFL79hyLiwMeIRdOzGZGNtXPS1G0n9_YnZDhf0w,11981
519
+ google_cloud_pipeline_components/v1/model_evaluation/evaluation_llm_text_generation_pipeline.py,sha256=z1Bx8p603cxGC_nre3tUs-3KF1O5t5xBwAWmK2H9R3U,11529
520
520
  google_cloud_pipeline_components/v1/model_evaluation/forecasting_component.py,sha256=gOnvKAJWa3velczeuVBCzW6b_tcc2v_lNFqHXGhjD44,10017
521
521
  google_cloud_pipeline_components/v1/model_evaluation/regression_component.py,sha256=eFrjrKQot3-SlRCoKoTOEsyp2Xj0GfDtrjpxTDKAHYY,9117
522
522
  google_cloud_pipeline_components/v1/vertex_notification_email/__init__.py,sha256=YIRljNy_oHY_vRda-kfhm5QiulNd_SIIPbmpzOiYJ0k,863
523
523
  google_cloud_pipeline_components/v1/vertex_notification_email/component.py,sha256=Dau8ZI0mzLBnLOUBQm6EtK8gbtX1u57t76Ud5qlg9xc,2163
524
524
  google_cloud_pipeline_components/v1/wait_gcp_resources/__init__.py,sha256=w6dfz-rYsYnxFapRH1Dix3GVz0mhPW0m1IVpE6z8jbg,878
525
525
  google_cloud_pipeline_components/v1/wait_gcp_resources/component.py,sha256=Nsfj5c3eeZq83fHLvv2IlpK4jrjxLxRksFYOl5W6JnA,2468
526
- google_cloud_pipeline_components-2.12.0.dist-info/LICENSE,sha256=VAc1R5OxOELKsX5L5Ldp5THfNtxtt1cMIZBaC0Jdj5Q,13118
527
- google_cloud_pipeline_components-2.12.0.dist-info/METADATA,sha256=GeF9-FA9p-AwA9y2--CTyacsia2uBSyr8i2aTNUwyOk,5890
528
- google_cloud_pipeline_components-2.12.0.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
529
- google_cloud_pipeline_components-2.12.0.dist-info/top_level.txt,sha256=E8T4T8KGMGLXbHvt2goa98oezRpxryPC6QhWBZ27Hhc,33
530
- google_cloud_pipeline_components-2.12.0.dist-info/RECORD,,
526
+ google_cloud_pipeline_components-2.13.1.dist-info/LICENSE,sha256=VAc1R5OxOELKsX5L5Ldp5THfNtxtt1cMIZBaC0Jdj5Q,13118
527
+ google_cloud_pipeline_components-2.13.1.dist-info/METADATA,sha256=0K2BCv2dfLs18vTVeEjTD4TkLAIOX5KMH5d1BMurowM,5880
528
+ google_cloud_pipeline_components-2.13.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
529
+ google_cloud_pipeline_components-2.13.1.dist-info/top_level.txt,sha256=E8T4T8KGMGLXbHvt2goa98oezRpxryPC6QhWBZ27Hhc,33
530
+ google_cloud_pipeline_components-2.13.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.40.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5