Skip to content

Commit

Permalink
Made Model.batch_predict(job_display_name=) optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark-kun committed Feb 3, 2022
1 parent be0d97c commit fabb496
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions google/cloud/aiplatform/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ def create(
(jobs.BatchPredictionJob):
Instantiated representation of the created batch prediction job.
"""
if not job_display_name:
job_display_name = cls._generate_display_name()

utils.validate_display_name(job_display_name)

Expand Down
4 changes: 2 additions & 2 deletions google/cloud/aiplatform/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2145,7 +2145,7 @@ def _deploy(

def batch_predict(
self,
job_display_name: str,
job_display_name: Optional[str] = None,
gcs_source: Optional[Union[str, Sequence[str]]] = None,
bigquery_source: Optional[str] = None,
instances_format: str = "jsonl",
Expand Down Expand Up @@ -2182,7 +2182,7 @@ def batch_predict(
Args:
job_display_name (str):
Required. The user-defined name of the BatchPredictionJob.
Optional. The user-defined name of the BatchPredictionJob.
The name can be up to 128 characters long and can be consist
of any UTF-8 characters.
gcs_source: Optional[Sequence[str]] = None
Expand Down

0 comments on commit fabb496

Please sign in to comment.