Skip to content

Commit

Permalink
fix: Added missing instances_format parameter to batch_prediction_job…
Browse files Browse the repository at this point in the history
…_samples

PiperOrigin-RevId: 508755317
  • Loading branch information
vertex-sdk-bot authored and copybara-github committed Feb 10, 2023
1 parent 96e9e12 commit 82a2afc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def create_batch_prediction_job_dedicated_resources_sample(
job_display_name: str,
gcs_source: Union[str, Sequence[str]],
gcs_destination: str,
instances_format: str = "jsonl",
machine_type: str = "n1-standard-2",
accelerator_count: int = 1,
accelerator_type: Union[str, aiplatform_v1.AcceleratorType] = "NVIDIA_TESLA_K80",
Expand All @@ -40,6 +41,7 @@ def create_batch_prediction_job_dedicated_resources_sample(
job_display_name=job_display_name,
gcs_source=gcs_source,
gcs_destination_prefix=gcs_destination,
instances_format=instances_format,
machine_type=machine_type,
accelerator_count=accelerator_count,
accelerator_type=accelerator_type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def test_create_batch_prediction_job_sample(
job_display_name=constants.DISPLAY_NAME,
gcs_source=constants.GCS_SOURCES,
gcs_destination=constants.GCS_DESTINATION,
instances_format=constants.INSTANCES_FORMAT,
machine_type=constants.ACCELERATOR_TYPE,
accelerator_count=constants.ACCELERATOR_COUNT,
accelerator_type=constants.ACCELERATOR_TYPE,
Expand All @@ -46,6 +47,7 @@ def test_create_batch_prediction_job_sample(
job_display_name=constants.DISPLAY_NAME,
gcs_source=constants.GCS_SOURCES,
gcs_destination_prefix=constants.GCS_DESTINATION,
instances_format=constants.INSTANCES_FORMAT,
machine_type=constants.ACCELERATOR_TYPE,
accelerator_count=constants.ACCELERATOR_COUNT,
accelerator_type=constants.ACCELERATOR_TYPE,
Expand Down
1 change: 1 addition & 0 deletions samples/model-builder/test_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
GCS_SOURCES = ["gs://bucket1/source1.jsonl", "gs://bucket7/source4.jsonl"]
BIGQUERY_SOURCE = "bq://bigquery-public-data.ml_datasets.iris"
GCS_DESTINATION = "gs://bucket3/output-dir/"
INSTANCES_FORMAT = "jsonl"

TRAINING_FRACTION_SPLIT = 0.7
TEST_FRACTION_SPLIT = 0.15
Expand Down

0 comments on commit 82a2afc

Please sign in to comment.