Reputation: 99
I have been trying to create a Vector Search in Google Cloud. For some specific files I can easily create it, for some others, I cannot and I keep getting the same error:
400 There are invalid records in the input file. Embedding size mismatch: expected 768, but got 1 3: There are invalid records in the input file. Embedding size mismatch: expected 768, but got 1
I am using the same examples provided on Google Cloud Website: https://cloud.google.com/vertex-ai/docs/vector-search/quickstart#build-index
my_index = aiplatform.MatchingEngineIndex.create_tree_ah_index(
display_name = f"vs-quickstart-index-{UID}",
contents_delta_uri = BUCKET_URI,
dimensions = 768,
approximate_neighbors_count = 10,
)
Even if I change the approximate_neighbors_count to 1, it does not change anything.
Anybody knows why this is happening and what should I do to fix it?
Thanks
Upvotes: 0
Views: 465
Reputation: 2373
As @Rob mentioned in the comment:
To solve the above issue, the file must be consistent and proper JSON format. It's really critical to make sure the file is consistent and in JSON format. The issue is resolved .
Posting the answer as community wiki for the benefit of the community that might encounter this use case in the future.
Feel free to edit this answer for additional information.
Upvotes: 1