Skip to content

Commit 82a2afc

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
fix: Added missing instances_format parameter to batch_prediction_job_samples
PiperOrigin-RevId: 508755317
1 parent 96e9e12 commit 82a2afc

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

samples/model-builder/create_batch_prediction_job_dedicated_resources_sample.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def create_batch_prediction_job_dedicated_resources_sample(
2525
job_display_name: str,
2626
gcs_source: Union[str, Sequence[str]],
2727
gcs_destination: str,
28+
instances_format: str = "jsonl",
2829
machine_type: str = "n1-standard-2",
2930
accelerator_count: int = 1,
3031
accelerator_type: Union[str, aiplatform_v1.AcceleratorType] = "NVIDIA_TESLA_K80",
@@ -40,6 +41,7 @@ def create_batch_prediction_job_dedicated_resources_sample(
4041
job_display_name=job_display_name,
4142
gcs_source=gcs_source,
4243
gcs_destination_prefix=gcs_destination,
44+
instances_format=instances_format,
4345
machine_type=machine_type,
4446
accelerator_count=accelerator_count,
4547
accelerator_type=accelerator_type,

samples/model-builder/create_batch_prediction_job_dedicated_resources_sample_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def test_create_batch_prediction_job_sample(
3131
job_display_name=constants.DISPLAY_NAME,
3232
gcs_source=constants.GCS_SOURCES,
3333
gcs_destination=constants.GCS_DESTINATION,
34+
instances_format=constants.INSTANCES_FORMAT,
3435
machine_type=constants.ACCELERATOR_TYPE,
3536
accelerator_count=constants.ACCELERATOR_COUNT,
3637
accelerator_type=constants.ACCELERATOR_TYPE,
@@ -46,6 +47,7 @@ def test_create_batch_prediction_job_sample(
4647
job_display_name=constants.DISPLAY_NAME,
4748
gcs_source=constants.GCS_SOURCES,
4849
gcs_destination_prefix=constants.GCS_DESTINATION,
50+
instances_format=constants.INSTANCES_FORMAT,
4951
machine_type=constants.ACCELERATOR_TYPE,
5052
accelerator_count=constants.ACCELERATOR_COUNT,
5153
accelerator_type=constants.ACCELERATOR_TYPE,

samples/model-builder/test_constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
GCS_SOURCES = ["gs://bucket1/source1.jsonl", "gs://bucket7/source4.jsonl"]
5353
BIGQUERY_SOURCE = "bq://bigquery-public-data.ml_datasets.iris"
5454
GCS_DESTINATION = "gs://bucket3/output-dir/"
55+
INSTANCES_FORMAT = "jsonl"
5556

5657
TRAINING_FRACTION_SPLIT = 0.7
5758
TEST_FRACTION_SPLIT = 0.15

0 commit comments

Comments
 (0)