Skip to content

Commit 2f1674e

Browse files
committed
Add pipeline name
1 parent 0537b8c commit 2f1674e

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

google/cloud/aiplatform/pipeline_jobs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ def __init__(
182182
"Expecting an ID following the regex pattern "
183183
'"[a-z][-a-z0-9]{{0,127}}"'.format(job_id)
184184
)
185+
job_name = _JOB_NAME_PATTERN.format(parent=self._parent, job_id=job_id)
185186

186187
builder = pipeline_utils.PipelineRuntimeConfigBuilder.from_job_spec_json(
187188
pipeline_job
@@ -196,6 +197,7 @@ def __init__(
196197

197198
self._gca_resource = gca_pipeline_job_v1beta1.PipelineJob(
198199
display_name=display_name,
200+
name=job_name,
199201
pipeline_spec=pipeline_job["pipelineSpec"],
200202
labels=labels,
201203
runtime_config=runtime_config,

tests/unit/aiplatform/test_pipeline_jobs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ def test_run_call_pipeline_service_create(
195195
# Construct expected request
196196
expected_gapic_pipeline_job = gca_pipeline_job_v1beta1.PipelineJob(
197197
display_name=_TEST_PIPELINE_JOB_ID,
198+
name=_TEST_PIPELINE_JOB_NAME,
198199
pipeline_spec={
199200
"components": {},
200201
"pipelineInfo": _TEST_PIPELINE_JOB_SPEC["pipelineSpec"]["pipelineInfo"],

0 commit comments

Comments
 (0)