Skip to content

Commit 066f32d

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
fix: Fix message to Json parse issue in Dataset class
PiperOrigin-RevId: 599675216
1 parent c9ea4f9 commit 066f32d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

google/cloud/aiplatform/datasets/dataset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ def export_data_for_custom_training(
805805
saved_query_id,
806806
annotation_schema_uri,
807807
split,
808-
)
808+
)._pb
809809
)
810810

811811
def update(

tests/system/aiplatform/test_dataset.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,14 @@ def test_export_data_for_custom_training(self, staging_bucket):
405405
)
406406

407407
# Ensure three output paths (training, validation and test) are provided
408-
assert len(export_data_response["exported_files"]) == 3
408+
assert len(export_data_response["exportedFiles"]) == 3
409409
# Ensure data stats are calculated and correct
410-
assert export_data_response["data_stats"]["training_data_items_count"] == 40
410+
assert int(export_data_response["dataStats"]["trainingDataItemsCount"]) == 40
411+
assert int(export_data_response["dataStats"]["validationDataItemsCount"]) == 5
412+
assert int(export_data_response["dataStats"]["testDataItemsCount"]) == 5
413+
assert int(export_data_response["dataStats"]["trainingAnnotationsCount"]) == 40
414+
assert int(export_data_response["dataStats"]["validationAnnotationsCount"]) == 5
415+
assert int(export_data_response["dataStats"]["testAnnotationsCount"]) == 5
411416

412417
def test_update_dataset(self):
413418
"""Create a new dataset and use update() method to change its display_name, labels, and description.

0 commit comments

Comments
 (0)