Required fields for JSONL files - but fails with no message

I have tried following the docs which states:

  • imageGcsUri - The only required field.

So I create an import JSONL file. It has multiple lines in the file, such as:

{"imageGcsUri": "{url}",  "classificationAnnotation": [{"displayName":"my_label"}]}

But it fails. The error messaging from Google is incredibly misleading:

Hello Vertex AI Customer,

Vertex AI partially imported data into dataset “main_MFI”, but some
resources were unable to be imported.
Additional Details:
Operation State: Partially failed with errors
Resource Name:
projects/{id}/locations/us-central1/datasets/{setId}
Error Messages: OK

To view the error on Cloud Console, go back to your dataset using URL

Sincerely,
The Google Cloud AI Team

What is this error???!!! Why doesn’t it work and what else is required?

Hi @identafly,

If you receive an error email, you can check your Cloud Console for more information related to it. This may be due to a permission error in your storage bucket or an invalid GCS URI, below is the example:

You might also want to check the formats you’re using, and refer to the JSON Lines documentation for details on the text format. Ensure that you also meet the data requirements when importing files based on the link you’ve provided.

Here’s how a JSONL file looks with multiples lines per type:

Single-Label classification JSON file:

{"imageGcsUri": "gs://bucket/filename1.jpeg", "classificationAnnotation": {"displayName": "daisy"}}

{"imageGcsUri": "gs://bucket/filename2.gif", "classificationAnnotation": {"displayName": "dandelion"}}

{"imageGcsUri": "gs://bucket/filename3.png", "classificationAnnotation": {"displayName": "roses"}}

Multi-Label classification JSON file:

{"imageGcsUri": "gs://bucket/filename1.jpeg", "classificationAnnotations": [{"displayName": "daisy"}, {"displayName": "full_shot"}]}

{"imageGcsUri": "gs://bucket/filename2.gif", "classificationAnnotations": [{"displayName": "dandelion"}, {"displayName": "medium_shot"}]}

{"imageGcsUri": "gs://bucket/filename3.png", "classificationAnnotations": [{"displayName": "roses"}, {"displayName": "extreme_closeup"}]}