1

In a Vertex AI pipeline I am updating an image dataset, thus:

    ds_op = gcc_aip.ImageDatasetImportDataOp(
        project=project,
        dataset=get_dataset_id_op.outputs['dataset'],
        gcs_source=DATASET_PATH,
        import_schema_uri=aiplatform.schema.dataset.ioformat.image.single_label_classification
    )

I have tried adding images, updating the csv file with their path and label and uploading this to GCS. Then I run the pipe, the images are uploaded to the dataset but their labels are ignored and they are classed as Unlabeled. What am I doing wrong? TIA!

UPDATE: I am trying to use 'data_item_labels (JsonObject): Labels that will be applied to newly imported DataItems.' but I don't know what format is expected. i have tried JSON, csv, json lines etc but keep getting

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)' 

errors.

UPDATE 2: finally figured out I should be passing a JSON object not a file uri, but I have tried everything I can think of and I either get JSON errors or "Invalid data_item_labels.".

schoon
  • 2,858
  • 3
  • 46
  • 78

0 Answers0