13def50468e9e734bd4da854623d6f6e2816f302,server/dvalib/retriever.py,FaissFlatRetriever,nearest_batch,#FaissFlatRetriever#Any#Any#,203

Before Change


            for i, k in enumerate(ids[vindex]):
                if k >= 0:
                    temp = {"rank": i + 1, "algo": self.name, "dist": float(dist[vindex, i])}
                    temp.update(self.files[k])
                    results[vindex].append(temp)
        return results

After Change


        for vindex in range(ids.shape[0]):
            for i, k in enumerate(ids[vindex]):
                if k >= 0:
                    index_entry = sorted(self.tree[k])[0]
                    temp = {"rank": i + 1, "algo": self.name, "dist": float(dist[vindex, i]),
                            "indexentries_pk":index_entry.data, "offset":k - index_entry.begin}
                    results[vindex].append(temp)
        return results
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

Instances


Project Name: AKSHAYUBHAT/DeepVideoAnalytics
Commit Name: 13def50468e9e734bd4da854623d6f6e2816f302
Time: 2018-07-15
Author: akshayubhat@gmail.com
File Name: server/dvalib/retriever.py
Class Name: FaissFlatRetriever
Method Name: nearest_batch


Project Name: AKSHAYUBHAT/DeepVideoAnalytics
Commit Name: 3b7726484e7de6b1a758e58108e618e10f175198
Time: 2018-07-09
Author: akshayubhat@gmail.com
File Name: server/dvalib/retriever.py
Class Name: FaissFlatRetriever
Method Name: nearest


Project Name: AKSHAYUBHAT/DeepVideoAnalytics
Commit Name: 5adbd982b0c728d9ae79ab431f24f2ea6761b137
Time: 2018-07-17
Author: akshayubhat@gmail.com
File Name: server/dvalib/retriever.py
Class Name: FaissApproximateRetriever
Method Name: nearest_batch


Project Name: AKSHAYUBHAT/DeepVideoAnalytics
Commit Name: 5adbd982b0c728d9ae79ab431f24f2ea6761b137
Time: 2018-07-17
Author: akshayubhat@gmail.com
File Name: server/dvalib/retriever.py
Class Name: FaissApproximateRetriever
Method Name: nearest