Skip to content

Commit fabb496

Browse files
committed
Made Model.batch_predict(job_display_name=) optional
1 parent be0d97c commit fabb496

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

google/cloud/aiplatform/jobs.py

+2
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,8 @@ def create(
527527
(jobs.BatchPredictionJob):
528528
Instantiated representation of the created batch prediction job.
529529
"""
530+
if not job_display_name:
531+
job_display_name = cls._generate_display_name()
530532

531533
utils.validate_display_name(job_display_name)
532534

google/cloud/aiplatform/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2145,7 +2145,7 @@ def _deploy(
21452145

21462146
def batch_predict(
21472147
self,
2148-
job_display_name: str,
2148+
job_display_name: Optional[str] = None,
21492149
gcs_source: Optional[Union[str, Sequence[str]]] = None,
21502150
bigquery_source: Optional[str] = None,
21512151
instances_format: str = "jsonl",
@@ -2182,7 +2182,7 @@ def batch_predict(
21822182
21832183
Args:
21842184
job_display_name (str):
2185-
Required. The user-defined name of the BatchPredictionJob.
2185+
Optional. The user-defined name of the BatchPredictionJob.
21862186
The name can be up to 128 characters long and can be consist
21872187
of any UTF-8 characters.
21882188
gcs_source: Optional[Sequence[str]] = None

0 commit comments

Comments
 (0)