Commit beed46f7 authored by del-zhenwu's avatar del-zhenwu Committed by Jin Hai
Browse files

Upgrade pyyaml and update tests (#681)

parent 5148fc15
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -88,8 +88,10 @@ class MilvusClient(object):
            index_type = IndexType.IVF_SQ8
        elif index_type == "ivf_sq8h":
            index_type = IndexType.IVF_SQ8H
        elif index_type == "mix_nsg":
            index_type = IndexType.MIX_NSG
        elif index_type == "nsg":
            index_type = IndexType.NSG
        elif index_type == "ivf_pq":
            index_type = IndexType.IVF_PQ
        index_params = {
            "index_type": index_type,
            "nlist": nlist,
+3 −3
Original line number Diff line number Diff line
numpy==1.16.3
pymilvus>=0.2.0
pymilvus-test>=0.2.0
scikit-learn==0.19.1
h5py==2.7.1
influxdb==5.2.2
pyyaml==3.12
pyyaml>=5.1
tableprint==0.8.0
ansicolors==1.1.8
scipy==1.3.1
+3 −3
Original line number Diff line number Diff line
@@ -55,9 +55,9 @@ def recall_calc(result_ids, true_ids, top_k, recall_k):
    sum_intersect_num = 0
    recall = 0.0
    for index, result_item in enumerate(result_ids):
        if len(set(true_ids[index][:top_k])) != len(set(result_item)):
            logger.warning("Error happened: query result length is wrong")
            continue
        # if len(set(true_ids[index][:top_k])) != len(set(result_item)):
        #     logger.warning("Error happened: query result length is wrong")
        #     continue
        tmp = set(true_ids[index][:recall_k]).intersection(set(result_item))
        sum_intersect_num = sum_intersect_num + len(tmp)
    recall = round(sum_intersect_num / (len(result_ids) * recall_k), 4)
+7 −7
Original line number Diff line number Diff line
datasets:
  - sift-128-euclidean: 
      index_file_sizes: [50, 1024]
      index_file_sizes: [1024]
      index_types: ['ivf_flat', 'ivf_sq8', 'ivf_sq8h']
      # index_types: ['ivf_sq8']
      nlists: [16384]
      search_param:
        nprobes: [1, 32, 128, 256]
        nprobes: [1, 8, 16, 32, 64, 128, 256, 512]
        top_ks: [10]
        nqs: [10000]
  - glove-25-angular:
      index_file_sizes: [50, 1024]
      index_file_sizes: [1024]
      index_types: ['ivf_flat', 'ivf_sq8', 'ivf_sq8h']
      # index_types: ['ivf_sq8']
      nlists: [16384]
      search_param:
        nprobes: [1, 32, 128, 256]
        nprobes: [1, 8, 16, 32, 64, 128, 256, 512]
        top_ks: [10]
        nqs: [10000]
  - glove-200-angular:
      index_file_sizes: [50, 1024]
      index_file_sizes: [1024]
      index_types: ['ivf_flat', 'ivf_sq8', 'ivf_sq8h']
      # index_types: ['ivf_sq8']
      nlists: [16384]
      search_param:
        nprobes: [1, 32, 128, 256]
        nprobes: [1, 8, 16, 32, 64, 128, 256, 512]
        top_ks: [10]
        nqs: [10000]
hdf5_path: /test/milvus/ann_hdf5/
+19 −0
Original line number Diff line number Diff line
datasets:
  - sift-128-euclidean: 
      index_file_sizes: [1024]
      index_types: ['ivf_flat', 'ivf_sq8']
      nlists: [16384]
      search_param:
        nprobes: [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
        top_ks: [10]
        nqs: [10000]
  - glove-200-angular:
      index_file_sizes: [1024]
      index_types: ['ivf_flat', 'ivf_sq8']
      # index_types: ['ivf_sq8']
      nlists: [16384]
      search_param:
        nprobes: [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
        top_ks: [10]
        nqs: [10000]
hdf5_path: /test/milvus/ann_hdf5/
Loading