Skip to content

Commit

Permalink
Randomly pick similarity when not provided explicitly.
Browse files Browse the repository at this point in the history
Change-Id: I8ca21ed5c11ec0f8dd6bc1e20522d059c52cb25b
Reviewed-on: https://review.couchbase.org/c/TAF/+/222557
Tested-by: Build Bot <[email protected]>
Reviewed-by: <[email protected]>
  • Loading branch information
ritalrw committed Jan 29, 2025
1 parent fc60fb1 commit fb3aa67
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pytests/aGoodDoctor/n1ql.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,9 @@ def create_indexes(self, buckets, skip_index=False, base64=False, xattr=False):
if workload.get("vector"):
vector_defn = workload.get("vector")[vector_defn_counter % len(workload.get("vector"))]
dim = workload.get("dim")
similarity = vector_defn["similarity"]
similarity = TestInputSingleton.input.param(
"similarity",
random.choice("L2_SQUARED", "EUCLIDEAN_SQUARED", "COSINE", "DOT"))
nProbe = vector_defn["nProbe"]
description = vector_defn.get("description", "IVF,%s" % vector_defn.get("quantization", "SQ8"))
vector_fields = "'dimension': {}, 'description': '{}', 'similarity': '{}', 'scan_nprobes': {}".format(
Expand Down

0 comments on commit fb3aa67

Please sign in to comment.