AI Slop Code RIsk Monitor

facebookresearch/faiss

A library for efficient similarity search and clustering of dense vectors.

4.8 Low pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for facebookresearch/faiss, a C++ project with 41,124 GitHub stars. SynthScan examined 272,533 lines of code across 961 source files, recording 1069 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 4.8 (Low pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

4.8
Adjusted Signal
4.8
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
41.1K
Stars
C++
Language
272.5K
Lines of Code
961
Files
1.1K
Pattern Hits
2026-10-12
Scan Date
0.04
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 16.0/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 887 finding(s).

Hallucinated Dependency & Supply Chain Risk 1.8/100 · LOW

Are imports declared and package/API names verified? 105 finding(s).

Agent Over-Engineering Ratio 11.9/100 · LOW

Are wrappers, guards, and repeated structures necessary? 524 finding(s).

PR Review Velocity Impact 21.4/100 · LOW

Which changes need focused human review? 1069 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 34MEDIUM 36LOW 999

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1069 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers441 hits · 436 pts
SeverityFileLineSnippetContext
LOWtests/test_local_search_quantizer.py187 def test_update_codebooks_with_double(self):CODE
LOWtests/test_local_search_quantizer.py210 def test_compute_binary_terms(self):CODE
LOWtests/test_local_search_quantizer.py472 def test_index_accuracy_reconstruct(self):CODE
LOWtests/test_local_search_quantizer.py478 def test_index_accuracy_cqint(self):CODE
LOWtests/test_fast_scan_ivf.py244 def test_by_residual_no_precomputed(self):CODE
LOWtests/test_fast_scan_ivf.py295 def test_qloss_no_residual_ip(self):CODE
LOWtests/test_fast_scan_ivf.py298 def test_qloss_by_residual_ip(self):CODE
LOWtests/test_fast_scan_ivf.py354 def test_equiv_pq_encode_decode(self):CODE
LOW⚡tests/test_fast_scan_ivf.py440 def test_no_residual_single_query(self):CODE
LOW⚡tests/test_fast_scan_ivf.py443 def test_by_residual_single_query(self):CODE
LOW⚡tests/test_fast_scan_ivf.py446 def test_no_residual_ip_single_query(self):CODE
LOW⚡tests/test_fast_scan_ivf.py449 def test_by_residual_ip_single_query(self):CODE
LOW⚡tests/test_fast_scan_ivf.py452 def test_no_residual_odd_dim_single_query(self):CODE
LOW⚡tests/test_fast_scan_ivf.py455 def test_by_residual_odd_dim_single_query(self):CODE
LOWtests/test_fast_scan_ivf.py1096 def test_fastscan_defaults_roundtrip(self):CODE
LOWtests/test_fast_scan_ivf.py1109 def test_fastscan_max_lists_num_caps_probes(self):CODE
LOWtests/test_fast_scan_ivf.py1128 def test_fastscan_ensure_topk_full_fills_heap(self):CODE
LOWtests/test_fast_scan_ivf.py1146 def test_fastscan_ensure_topk_full_with_restrictive_selector(self):CODE
LOWtests/test_fast_scan_ivf.py1167 def test_fastscan_ensure_topk_full_multi_query_works(self):CODE
LOWtests/test_fast_scan_ivf.py1192 def test_fastscan_range_honors_max_empty_result_buckets(self):CODE
LOWtests/test_fast_scan_ivf.py1228 def test_fastscan_fields_exposed(self):CODE
LOWtests/test_contrib.py197 def test_query_iterator_similarity_metric(self):CODE
LOWtests/test_contrib.py360 def test_equal_time_better_perf_shadows(self):CODE
LOWtests/test_contrib.py378 def test_index_pretransformed(self):CODE
LOWtests/test_contrib.py529 def test_range_search_preassigned_coarse_dis_none_matches_zeros(self):CODE
LOWtests/test_contrib.py906 def test_ondisk_merge_with_shift_ids(self):CODE
LOWtests/test_contrib.py924 def test_ivf_scalar_quantizer_types(self):CODE
LOWtests/test_contrib.py957 def test_scalar_quantizer_types(self):CODE
LOWtests/test_contrib.py985 def test_get_code_size_hnsw_non_default_m(self):CODE
LOWtests/test_contrib.py1003 def test_get_code_size_ivf_hnsw_non_default_m(self):CODE
LOWtests/test_contrib.py1015 def test_get_code_size_hnsw_roundtrip(self):CODE
LOWtests/test_contrib.py1024 def test_hnsw_storage_reverse_index_factory(self):CODE
LOWtests/test_contrib.py1041 def test_get_code_size_hnsw_non_flat_storage(self):CODE
LOWtests/test_contrib.py1065 def test_ivfpqr_reverse_index_factory(self):CODE
LOWtests/test_contrib.py1074 def test_rabitq_reverse_index_factory(self):CODE
LOWtests/test_graph_based.py113 def test_hnsw_unbounded_queue(self):CODE
LOWtests/test_graph_based.py393 def test_add_nan_vector_to_ivf_hnsw(self):CODE
LOWtests/test_graph_based.py611 def test_nsg_supports_pre_built_knn_graph(self):CODE
LOWtests/test_graph_based.py620 def test_nsg_with_pre_built_knn_graph_throws_when_rebuilding_via_add(self):CODE
LOWtests/test_graph_based.py639 def test_nsg_rebuild_throws_with_pre_built_knn_graph(self):CODE
LOWtests/test_fast_scan.py215 def do_test_recall_matches_pq(self, d):CODE
LOWtests/test_clustering_initialization.py23def verify_centroids_from_dataset(test_case, centroids, dataset):CODE
LOWtests/test_clustering_initialization.py63 def test_initialization_methods(self):CODE
LOWtests/test_clustering_initialization.py128 def test_with_existing_centroids(self):CODE
LOWtests/test_super_kmeans.py14 def test_train_rejects_too_few_points(self):CODE
LOWtests/test_super_kmeans.py48 def test_objective_decreases_monotonically(self):CODE
LOWtests/test_super_kmeans.py63 def test_pruned_iter_assignments_close_to_vanilla(self):CODE
LOWtests/test_super_kmeans.py84 def test_spherical_objective_close_to_vanilla_spherical(self):CODE
LOWtests/test_super_kmeans.py110 def test_spherical_produces_unit_centroids(self):CODE
LOWtests/test_super_kmeans.py125 def test_use_super_kmeans_field_is_inherited(self):CODE
LOWtests/test_super_kmeans.py133 def test_pruning_rate_in_expected_range(self):CODE
LOWtests/test_super_kmeans.py154 def test_pdx_offset_correct_for_unaligned_y_batch(self):CODE
LOWtests/test_super_kmeans.py209 def test_cluster_splitting_with_many_duplicates(self):CODE
LOWtests/test_super_kmeans.py236 def test_train_populates_kmeans_surface(self):CODE
LOWtests/test_super_kmeans.py254 def test_final_obj_matches_vanilla_kmeans(self):CODE
LOW⚡tests/test_svs_py.py507 def test_svs_range_search_selected(self):CODE
LOW⚡tests/test_svs_py.py511 def test_svs_add_search_remove_interface(self):CODE
LOW⚡tests/test_svs_py.py515 def test_svs_batch_operations(self):CODE
LOW⚡tests/test_svs_py.py878 def test_svs_leanvec_ood_training(self):CODE
LOW⚡tests/test_svs_py.py883 def test_svs_leanvec_ood_training_smaller(self):CODE
381 more matches not shown…
Over-Commented Block276 hits · 275 pts
SeverityFileLineSnippetContext
LOWCMakeLists.txt1# @lint-ignore-every LICENSELINTCOMMENT
LOWpyproject-gpu-cuvs.toml141# auditwheel excludes (not vendored; supplied at runtime by nvidia-* / libcuvs-cu13COMMENT
LOWtutorial/python/11-SVS.py1# Portions Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWtests/test_fastscan_filter.cpp1/*COMMENT
LOWtests/test_svs.cpp21 * limitations under the License.COMMENT
LOWtests/test_hnsw.cpp1/*COMMENT
LOWtests/test_transfer_invlists.cpp1/*COMMENT
LOWtests/test_svs_py.py1# Portions Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWtests/test_zerocopy.cpp1/*COMMENT
LOWtests/test_sq_rvv_tail_and_semantics.cpp61#include <memory>COMMENT
LOWtests/test_sq_rvv_tail_and_semantics.cpp481// ===========================================================================COMMENT
LOWtests/test_ivf_index.cpp1/*COMMENT
LOWtests/test_ivf_index.cpp21#include <faiss/IndexIVFFlat.h>COMMENT
LOWtests/test_meta_index.py141 if with_threads:COMMENT
LOWtests/test_distances_dispatch.cpp1/*COMMENT
LOWtests/test_distances_dispatch.cpp21// * Functions returning an integer (fvec_L2sqr_ny_nearest's chosenCOMMENT
LOWtests/test_ivf_early_termination.cpp1/*COMMENT
LOWtests/test_ivf_sharding.cpp1/*COMMENT
LOWtests/test_super_kmeans_foundations.cpp1/*COMMENT
LOWtests/test_super_kmeans_foundations.cpp21#include <faiss/utils/fp16.h>COMMENT
LOWtests/test_pipnn.cpp1/*COMMENT
LOWtests/test_pipnn.cpp21#include <tuple>COMMENT
LOWtests/test_omp_exception_safety.cpp1/*COMMENT
LOWtests/test_omp_exception_safety.cpp381 std::vector<idx_t> labels(1);COMMENT
LOWtests/bench_hnsw_deterministic.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWtests/test_mmap.cpp1/*COMMENT
LOWtests/test_scalar_quantizer.cpp1/*COMMENT
LOWtests/test_single_query_collect_handler.cpp21 * and calling pq4_accumulate_loop_qbs_fixed_scaler_simd directly.COMMENT
LOWtests/test_custom_result_handler.cpp1/*COMMENT
LOWtests/test_read_index_deserialize.cpp1/*COMMENT
LOWtests/test_read_index_deserialize.cpp21#include <faiss/IndexAdditiveQuantizer.h>COMMENT
LOWtests/test_read_index_deserialize.cpp161// Reading a non-canonical byte directly into a bool is UB and tripsCOMMENT
LOWtests/test_read_index_deserialize.cpp181 expect_read_throws_with(buf, "invalid bool encoding");COMMENT
LOWtests/test_read_index_deserialize.cpp821 std::vector<uint8_t> buf;COMMENT
LOWtests/test_read_index_deserialize.cpp1461 // entry_pointCOMMENT
LOWtests/test_read_index_deserialize.cpp3301// -----------------------------------------------------------------------COMMENT
LOWtests/test_read_index_deserialize.cpp3701 push_index_header(buf, /*d=*/4, /*ntotal=*/0);COMMENT
LOWtests/test_read_index_deserialize.cpp3921}COMMENT
LOWtests/test_read_index_deserialize.cpp4401// name, and the entry size straight off the stream. All three areCOMMENT
LOW.github/actions/build_cmake/action.yml61 # bin/python is 3.14, and forcing it strands conda's own compiledCOMMENT
LOW.github/actions/build_cmake/action.yml101 conda install -y -q -p "$CONDA" mkl=2024.2.2 mkl-devel=2024.2.2COMMENT
LOW.github/actions/build_cmake/action.yml141 if [ "${{ inputs.rocm }}" = "ON" ]; thenCOMMENT
LOW.github/actions/build_cmake/action.yml341COMMENT
LOWfaiss/index_factory.cpp21#include <faiss/Index2Layer.h>COMMENT
LOWfaiss/index_factory.cpp41#include <faiss/IndexLattice.h>COMMENT
LOWfaiss/index_factory.cpp61#include <faiss/svs/IndexSVSIVF.h>COMMENT
LOWfaiss/IndexFastScan.cpp1/*COMMENT
LOWfaiss/factory_tools.cpp21#include <faiss/IndexIVFFlat.h>COMMENT
LOWfaiss/CMakeLists.txt1# Portions Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWfaiss/IndexIVFSQFastScan.cpp21#include <faiss/impl/ScalarQuantizer.h>COMMENT
LOWfaiss/IndexHNSW.cpp21COMMENT
LOWfaiss/IndexHNSW.cpp61// (e.g. METRIC_INNER_PRODUCT), distance values are real similarity scoresCOMMENT
LOWfaiss/IndexIVF.cpp1/*COMMENT
LOWfaiss/IndexFlat.cpp1/*COMMENT
LOWfaiss/IndexFlat.cpp861 FAISS_THROW_IF_NOT(batch_size == 1);COMMENT
LOWfaiss/AutoTune.cpp21#include <faiss/utils/utils.h>COMMENT
LOWfaiss/IndexIVF.h101 /// 0 means unlimited, i.e. bounded only by nprobe. When set togetherCOMMENT
LOWfaiss/IndexIVFPQ.cpp21#include <faiss/utils/distances_dispatch.h>COMMENT
LOWfaiss/index_io.h121// When nonzero, deserialization rejects loop-driving fields (nlist,COMMENT
LOWfaiss/index_io.h141// When nonzero, deserialization rejects IndexLattice payloads whoseCOMMENT
216 more matches not shown…
Unused Imports105 hits · 98 pts
SeverityFileLineSnippetContext
LOWtests/test_referenced_objects.py7CODE
LOWtests/test_referenced_objects.py7CODE
LOWtests/test_referenced_objects.py7CODE
LOWtests/test_referenced_objects.py7CODE
LOWtests/test_product_quantizer.py6CODE
LOWtests/test_product_quantizer.py6CODE
LOWtests/test_product_quantizer.py6CODE
LOWtests/test_index_binary_from_float.py6CODE
LOWtests/test_index_binary_from_float.py6CODE
LOWtests/test_index_binary_from_float.py6CODE
LOWtests/test_binary_io.py8CODE
LOWtests/test_binary_io.py8CODE
LOWtests/test_binary_io.py8CODE
LOWtests/test_binary_io.py8CODE
LOWtests/test_scalar_quantizer_correctness.py6CODE
LOWtests/test_scalar_quantizer_correctness.py6CODE
LOWtests/test_scalar_quantizer_correctness.py6CODE
LOWtests/test_sq_fastscan.py7CODE
LOWtests/test_sq_fastscan.py7CODE
LOWtests/test_sq_fastscan.py7CODE
LOWtests/test_wheel_smoke.py174CODE
LOWtests/bench_transposed_encode.py6CODE
LOWtests/test_build_blocks.py6CODE
LOWtests/test_build_blocks.py6CODE
LOWtests/test_build_blocks.py6CODE
LOWtests/bench_hnsw_deterministic.py29CODE
LOWtests/test_binary_factory.py6CODE
LOWtests/test_binary_factory.py6CODE
LOWtests/test_binary_factory.py6CODE
LOWtests/test_index.py7CODE
LOWtests/test_index.py7CODE
LOWtests/test_index.py7CODE
LOWtests/test_omp_threads_py.py6CODE
LOWtests/test_omp_threads_py.py6CODE
LOWtests/test_omp_threads_py.py6CODE
LOWtests/test_omp_threads_py.py6CODE
LOWtests/test_index_accuracy.py6CODE
LOWtests/test_index_accuracy.py6CODE
LOWtests/test_index_accuracy.py6CODE
LOWtests/test_ivflib.py6CODE
LOWtests/test_ivflib.py6CODE
LOWtests/test_ivflib.py6CODE
LOWtests/common_faiss_tests.py8CODE
LOWtests/common_faiss_tests.py8CODE
LOWtests/common_faiss_tests.py8CODE
LOWtests/common_faiss_tests.py8CODE
LOWtests/test_standalone_codec.py8CODE
LOWtests/test_clustering.py6CODE
LOWtests/test_clustering.py6CODE
LOWtests/test_clustering.py6CODE
LOWcontrib/torch/clustering.py14CODE
LOWfaiss/gpu/test/test_gpu_basics.py6CODE
LOWfaiss/gpu/test/test_gpu_basics.py6CODE
LOWfaiss/gpu/test/test_gpu_basics.py6CODE
LOWfaiss/gpu/test/test_gpu_basics.py6CODE
LOWfaiss/gpu/test/test_gpu_index_refs.py6CODE
LOWfaiss/gpu/test/test_gpu_index_ivfsq.py6CODE
LOWfaiss/gpu/test/test_gpu_index.py6CODE
LOWfaiss/gpu/test/test_gpu_index.py6CODE
LOWfaiss/gpu/test/test_gpu_index.py6CODE
45 more matches not shown…
Empty Error Handlers18 hits · 90 pts
SeverityFileLineSnippetContext
HIGHtests/test_contrib.py773except ZeroDivisionError:CODE
HIGHtests/test_svs_py.py1676except OSError:CODE
HIGHtests/test_svs_py.py1790except OSError:CODE
HIGHtests/test_svs_py.py1878except OSError:CODE
HIGHtests/test_rabitq_fastscan.py370except RuntimeError:CODE
HIGHtests/test_factory.py35except RuntimeError:CODE
HIGHtests/test_fastscan_filter.py348except RuntimeError:CODE
HIGHtests/test_io.py577except Exception:CODE
HIGHtests/test_io.py609except Exception:CODE
HIGHtests/test_io.py641except Exception:CODE
HIGHtests/test_build_blocks.py219except Exception:CODE
HIGHtests/test_index_composite.py137except RuntimeError:CODE
HIGHtests/test_index_composite.py191except RuntimeError:CODE
HIGHtests/test_index_composite.py204except RuntimeError:CODE
HIGHtests/test_index_composite.py579except RuntimeError:CODE
HIGHtests/test_index_composite.py37except RuntimeError:CODE
HIGHfaiss/gpu/test/test_multi_gpu.py52except RuntimeError:CODE
HIGHfaiss/python/__init__.py603except NameError:CODE
Deep Nesting82 hits · 77 pts
SeverityFileLineSnippetContext
LOWtests/test_local_search_quantizer.py70CODE
LOWtests/test_graph_based.py806CODE
LOWtests/test_rabitq_fastscan.py180CODE
LOWtests/test_rabitq_fastscan.py561CODE
LOWtests/test_rabitq_fastscan.py710CODE
LOWtests/test_rabitq_fastscan.py757CODE
LOWtests/test_rabitq_fastscan.py809CODE
LOWtests/test_rabitq_fastscan.py850CODE
LOWtests/test_rabitq_fastscan.py934CODE
LOWtests/test_rabitq_fastscan.py1024CODE
LOWtests/test_ivf_flat_panorama.py825CODE
LOWtests/test_flat_panorama.py478CODE
LOWtests/test_flat_panorama.py721CODE
LOWtests/test_scalar_quantizer_correctness.py585CODE
LOWtests/test_scalar_quantizer_correctness.py636CODE
LOWtests/test_fastscan_filter.py31CODE
LOWtests/test_eden.py212CODE
LOWtests/test_sq_fastscan.py72CODE
LOWtests/test_sq_fastscan.py267CODE
LOWtests/test_merge_index.py23CODE
LOWtests/test_merge_index.py91CODE
LOWtests/test_refine_panorama.py463CODE
LOWtests/test_index_composite.py723CODE
LOWtests/test_hnsw_panorama.py355CODE
LOWtests/test_index.py140CODE
LOWtests/test_index.py574CODE
LOWtests/test_rabitq.py609CODE
LOWtests/test_rabitq.py635CODE
LOWtests/test_rabitq.py656CODE
LOWtests/test_rabitq.py688CODE
LOWtests/test_rabitq.py731CODE
LOWtests/test_rabitq.py752CODE
LOWtests/test_rabitq.py785CODE
LOWtests/test_rabitq.py828CODE
LOWtests/test_rabitq.py907CODE
LOWtests/test_index_accuracy.py415CODE
LOWtests/test_refine.py199CODE
LOWtests/test_search_params.py26CODE
LOWcontrib/exhaustive_search.py60CODE
LOWcontrib/datasets.py508CODE
LOWcontrib/factory_tools.py10CODE
LOWcontrib/factory_tools.py88CODE
LOWcontrib/big_batch_search.py237CODE
LOWcontrib/big_batch_search.py219CODE
LOWfaiss/gpu/test/test_tiebreak_repro.py112CODE
LOWfaiss/gpu/test/torch_test_contrib_gpu.py288CODE
LOWfaiss/gpu/test/torch_test_contrib_gpu.py424CODE
LOWfaiss/gpu/test/test_gpu_index_ivfsq.py113CODE
LOWbenchs/bench_hybrid_cpu_gpu.py225CODE
LOWbenchs/bench_hybrid_cpu_gpu.py292CODE
LOWbenchs/bench_quantizer.py42CODE
LOWbenchs/bench_pq_tables.py19CODE
LOWbenchs/bench_hnsw_prune_headroom.py53CODE
LOWbenchs/bench_gpu_1bn.py705CODE
LOWbenchs/bench_rabitq.py156CODE
LOWbenchs/bench_eden.py89CODE
LOWbenchs/bench_eden.py129CODE
LOWbenchs/bench_eden.py351CODE
LOWbenchs/bench_eden.py501CODE
LOWbenchs/bench_fw/optimize.py130CODE
22 more matches not shown…
Cross-File Repetition15 hits · 75 pts
SeverityFileLineSnippetContext
HIGHtests/test_ivf_flat_panorama.py0test correctness with various n_levels parameter valuesSTRING
HIGHtests/test_flat_panorama.py0test correctness with various n_levels parameter valuesSTRING
HIGHtests/test_refine_panorama.py0test correctness with various n_levels parameter valuesSTRING
HIGHtests/test_ivf_flat_panorama.py0test edge case: more levels than dimension naturally supportsSTRING
HIGHtests/test_flat_panorama.py0test edge case: more levels than dimension naturally supportsSTRING
HIGHtests/test_refine_panorama.py0test edge case: more levels than dimension naturally supportsSTRING
HIGHtests/test_ivf_flat_panorama.py0test id selectors with dataset smaller than batch sizeSTRING
HIGHtests/test_flat_panorama.py0test id selectors with dataset smaller than batch sizeSTRING
HIGHtests/test_refine_panorama.py0test id selectors with dataset smaller than batch sizeSTRING
HIGHtests/test_ivf_flat_panorama.py0test adding vectors incrementally in multiple batchesSTRING
HIGHtests/test_flat_panorama.py0test adding vectors incrementally in multiple batchesSTRING
HIGHtests/test_refine_panorama.py0test adding vectors incrementally in multiple batchesSTRING
HIGHtests/test_ivf_flat_panorama.py0test the correctness of the ratio of dimensions scannedSTRING
HIGHtests/test_flat_panorama.py0test the correctness of the ratio of dimensions scannedSTRING
HIGHtests/test_refine_panorama.py0test the correctness of the ratio of dimensions scannedSTRING
Structural Annotation Overuse32 hits · 54 pts
SeverityFileLineSnippetContext
LOWINSTALL.md118## Step 1: invoking CMakeCOMMENT
LOWINSTALL.md170## Step 2: Invoking MakeCOMMENT
LOWINSTALL.md205## Step 3: Building the python bindings (optional)COMMENT
LOWINSTALL.md216## Step 4: Installing the C++ library and headers (optional)COMMENT
LOWINSTALL.md227## Step 5: Testing (optional)COMMENT
LOW.github/workflows/index-io-backward-compatibility.yml23 # Step 1: Build with CMake and write filesCOMMENT
LOW.github/workflows/index-io-backward-compatibility.yml48 # Step 2: Install conda faiss-cpu in a clean environment and read filesCOMMENT
LOW.github/workflows/index-io-backward-compatibility.yml85 # Step 1: Install conda faiss-cpu in a clean environment and write filesCOMMENT
LOW.github/workflows/index-io-backward-compatibility.yml114 # Step 2: Build with CMake and read filesCOMMENT
LOWfaiss/impl/RaBitQuantizer.cpp127 // Step 1: Compute 1-bit quantization and base factorsCOMMENT
LOWfaiss/impl/RaBitQuantizer.cpp167 // Step 2: Compute ex-bits quantization (if nb_bits > 1)COMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp263 // Step 1: Compute L2 norm of residualCOMMENT
LOW⚡faiss/impl/RaBitQuantizerMultiBit.cpp278 // Step 2: Normalize residualCOMMENT
LOW⚡faiss/impl/RaBitQuantizerMultiBit.cpp284 // Step 3: Take absolute valueCOMMENT
LOW⚡faiss/impl/RaBitQuantizerMultiBit.cpp290 // Step 4: Find optimal scaling factorCOMMENT
LOW⚡faiss/impl/RaBitQuantizerMultiBit.cpp293 // Step 5: Quantize to ex_bitsCOMMENT
LOW⚡faiss/impl/RaBitQuantizerMultiBit.cpp304 // Step 6: Handle negative dimensions (flip bits)COMMENT
LOW⚡faiss/impl/RaBitQuantizerMultiBit.cpp312 // Step 7: Pack codes into byte arrayCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm273 // Step 1: coarse distance matrixCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm297 // Step 2: coarse top-nprobeCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm308 // Step 3: IVF scanCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm340 // Step 4: mergeCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm439 // Step 1: build per-(query, probe) PQ lookup tables.COMMENT
LOWfaiss/gpu_metal/MetalDistance.mm454 // Step 2: scan the assigned inverted lists with 8-bit ADC. The small-listCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm477 // Step 3: merge per-list top-k into the final top-k.COMMENT
LOW⚡faiss/gpu_metal/MetalDistance.mm605 // Step 1: per-query M*256 term (once per batch, not per probe).COMMENT
LOW⚡faiss/gpu_metal/MetalDistance.mm610 // Step 2: fused LUT-combine + list scan with exact running top-k.COMMENT
LOWfaiss/gpu_metal/MetalDistance.mm640 // Step 3: merge the nprobe per-list top-k in rounds of groupSize listsCOMMENT
LOWfaiss/docs/simd_dynamic_dispatch_migration.md97### Step 1: Templatize on SIMDLevelCOMMENT
LOWfaiss/docs/simd_dynamic_dispatch_migration.md138### Step 2: Split into per-SIMD translation unitsCOMMENT
LOWfaiss/docs/simd_dynamic_dispatch_migration.md195### Step 3: Wire up dispatchCOMMENT
LOWfaiss/docs/simd_dynamic_dispatch_migration.md247### Step 4: Register in build systemCOMMENT
Decorative Section Separators14 hits · 45 pts
SeverityFileLineSnippetContext
MEDIUMCMakeLists.txt8# =============================================================================COMMENT
MEDIUMCMakeLists.txt20# =============================================================================COMMENT
MEDIUM⚡tests/test_rabitq.py486# ==============================================================================COMMENT
MEDIUM⚡tests/test_rabitq.py488# ==============================================================================COMMENT
MEDIUMfaiss/CMakeLists.txt11# =============================================================================COMMENT
MEDIUMfaiss/CMakeLists.txt15# =============================================================================COMMENT
MEDIUMfaiss/CMakeLists.txt100# =============================================================================COMMENT
MEDIUMfaiss/CMakeLists.txt562# =============================================================================COMMENT
MEDIUMfaiss/CMakeLists.txt567# =============================================================================COMMENT
MEDIUMfaiss/gpu/CMakeLists.txt7# =============================================================================COMMENT
MEDIUMfaiss/gpu/CMakeLists.txt19# =============================================================================COMMENT
MEDIUMfaiss/gpu/test/CMakeLists.txt7# =============================================================================COMMENT
MEDIUMfaiss/gpu/test/CMakeLists.txt19# =============================================================================COMMENT
MEDIUMfaiss/utils/simd_impl/partitioning_simdlib256.h47// ── Per-TU SIMD type aliases ──────────────────────────────────────────COMMENT
Verbosity Indicators23 hits · 40 pts
SeverityFileLineSnippetContext
LOW.github/workflows/index-io-backward-compatibility.yml23 # Step 1: Build with CMake and write filesCOMMENT
LOW.github/workflows/index-io-backward-compatibility.yml48 # Step 2: Install conda faiss-cpu in a clean environment and read filesCOMMENT
LOW.github/workflows/index-io-backward-compatibility.yml85 # Step 1: Install conda faiss-cpu in a clean environment and write filesCOMMENT
LOW.github/workflows/index-io-backward-compatibility.yml114 # Step 2: Build with CMake and read filesCOMMENT
LOWfaiss/impl/RaBitQuantizer.cpp127 // Step 1: Compute 1-bit quantization and base factorsCOMMENT
LOWfaiss/impl/RaBitQuantizer.cpp167 // Step 2: Compute ex-bits quantization (if nb_bits > 1)COMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp263 // Step 1: Compute L2 norm of residualCOMMENT
LOW⚡faiss/impl/RaBitQuantizerMultiBit.cpp278 // Step 2: Normalize residualCOMMENT
LOW⚡faiss/impl/RaBitQuantizerMultiBit.cpp284 // Step 3: Take absolute valueCOMMENT
LOW⚡faiss/impl/RaBitQuantizerMultiBit.cpp290 // Step 4: Find optimal scaling factorCOMMENT
LOW⚡faiss/impl/RaBitQuantizerMultiBit.cpp293 // Step 5: Quantize to ex_bitsCOMMENT
LOW⚡faiss/impl/RaBitQuantizerMultiBit.cpp304 // Step 6: Handle negative dimensions (flip bits)COMMENT
LOW⚡faiss/impl/RaBitQuantizerMultiBit.cpp312 // Step 7: Pack codes into byte arrayCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm273 // Step 1: coarse distance matrixCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm297 // Step 2: coarse top-nprobeCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm308 // Step 3: IVF scanCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm340 // Step 4: mergeCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm439 // Step 1: build per-(query, probe) PQ lookup tables.COMMENT
LOWfaiss/gpu_metal/MetalDistance.mm454 // Step 2: scan the assigned inverted lists with 8-bit ADC. The small-listCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm477 // Step 3: merge per-list top-k into the final top-k.COMMENT
LOW⚡faiss/gpu_metal/MetalDistance.mm605 // Step 1: per-query M*256 term (once per batch, not per probe).COMMENT
LOW⚡faiss/gpu_metal/MetalDistance.mm610 // Step 2: fused LUT-combine + list scan with exact running top-k.COMMENT
LOWfaiss/gpu_metal/MetalDistance.mm640 // Step 3: merge the nprobe per-list top-k in rounds of groupSize listsCOMMENT
AI Slop Vocabulary9 hits · 24 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_index_accuracy.py252 index.nprobe = 4 # hopefully more robust than 1CODE
MEDIUMtests/test_index_accuracy.py310 index.nprobe = 4 # hopefully more robust than 1CODE
MEDIUMfaiss/IndexPQ.h118/// statistics are robust to internal threading, but not ifCOMMENT
MEDIUMfaiss/IndexIVFPQ.h186/// statistics are robust to internal threading, but not ifCOMMENT
MEDIUMfaiss/impl/PanoramaStats.h17/// Statistics are not robust to internal threading nor toCOMMENT
MEDIUMfaiss/gpu/test/test_gpu_index.py365 # precomputed codes also utilize the coarse quantizerCOMMENT
LOWfaiss/python/array_conversions.py94# TODO: once deprecated classes are removed, remove the dict and just useCOMMENT
MEDIUMfaiss/utils/hamming_distance/hamming_computer-avx512.h16// GenHammingComputer classes leverage SSE/AVX2 intrinsics.COMMENT
MEDIUMfaiss/utils/hamming_distance/hamming_computer-avx2.h14// GenHammingComputer classes leverage SSE/AVX2 intrinsics.COMMENT
Excessive Try-Catch Wrapping18 hits · 23 pts
SeverityFileLineSnippetContext
LOWtests/test_io.py577 except Exception:CODE
LOWtests/test_io.py609 except Exception:CODE
LOWtests/test_io.py641 except Exception:CODE
LOWtests/test_build_blocks.py219 except Exception:CODE
LOW…ndex_io_backward_compatibility/cmake_conda_io_utils.py255 except Exception as e:CODE
LOW…ndex_io_backward_compatibility/cmake_conda_io_utils.py288 except Exception as e:CODE
LOW…ndex_io_backward_compatibility/cmake_conda_io_utils.py318 except Exception as e:CODE
LOW…ndex_io_backward_compatibility/cmake_conda_io_utils.py348 except Exception as e:CODE
LOWcontrib/rpc.py145 except Exception as e:CODE
LOW⚡faiss/gpu/test/test_index_cpu_to_gpu.py43 except Exception as e:CODE
LOW⚡faiss/gpu/test/test_index_cpu_to_gpu.py59 except Exception as e:CODE
LOWfaiss/gpu/test/test_index_cpu_to_gpu.py97 except Exception as e:CODE
MEDIUMfaiss/gpu/test/test_index_cpu_to_gpu.py40def verify_throws_not_implemented_exception(self, factory_string):CODE
MEDIUMfaiss/gpu/test/test_index_cpu_to_gpu.py50def verify_clones_successfully(CODE
MEDIUMfaiss/gpu/test/test_index_cpu_to_gpu.py92def test_with_flag_set_to_false(self):CODE
LOWbenchs/bench_all_ivf/parse_bench_all_ivf.py139 except Exception as e:CODE
LOWdemos/offline_ivf/offline_ivf.py617 except Exception:CODE
MEDIUMdemos/offline_ivf/offline_ivf.py605def _knn_function(self, xq, xb, k, metric, thread_id=None):CODE
Self-Referential Comments7 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_graph_based.py404 # Create a vector with NaN in the first componentCOMMENT
MEDIUMtests/test_flat_panorama.py686 # Create a random permutationCOMMENT
MEDIUMtests/test_wheel_smoke_gpu.py30# This file is the faiss-gpu wheel smoke test. It also gets collected byCOMMENT
MEDIUMtests/test_hnsw_panorama.py437 # Create a permutation (reverse order for simplicity)COMMENT
MEDIUMtests/test_index.py868 # Create the datasetCOMMENT
MEDIUMtests/test_search_params.py167 # Create a mask of valid IDs (those in subset)COMMENT
MEDIUMfaiss/gpu/hipify.sh42 # Create a backup of the original gpu directoryCOMMENT
Modern Structural Boilerplate10 hits · 10 pts
SeverityFileLineSnippetContext
LOWcontrib/client_server.py65 def set_nprobe(self, nprobe: int) -> None:CODE
LOWcontrib/client_server.py68 def set_omp_num_threads(self, nt: int) -> None:CODE
LOWfaiss/python/__init__.py175logger = logging.getLogger(__name__)CODE
LOWfaiss/python/loader.py107logger = logging.getLogger(__name__)CODE
LOWbenchs/bench_fw/optimize.py20logger = logging.getLogger(__name__)CODE
LOWbenchs/bench_fw/benchmark.py32logger = logging.getLogger(__name__)CODE
LOWbenchs/bench_fw/index.py39logger = logging.getLogger(__name__)CODE
LOWbenchs/bench_fw/benchmark_io.py24logger = logging.getLogger(__name__)CODE
LOWbenchs/bench_fw/descriptors.py16logger = logging.getLogger(__name__)CODE
LOWbenchs/bench_fw/utils.py19logger = logging.getLogger(__name__)CODE
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/test_svs_py.py30# Check if LVQ/LeanVec support is availableCOMMENT
LOWtests/test_hnsw_panorama.py409 # Check if this neighbor is still in the result setCOMMENT
LOWfaiss/python/class_wrappers.py274 # Check if the attribute already exists (valid attribute)COMMENT
LOWfaiss/python/class_wrappers.py276 # Check if it exists on the instance or classCOMMENT
AI Structural Patterns6 hits · 6 pts
SeverityFileLineSnippetContext
LOWcontrib/big_batch_search.py237CODE
LOWfaiss/gpu/test/bench_approaches.py116CODE
LOWbenchs/kmeans_mnist.py35CODE
LOWbenchs/bench_hnsw_prune_headroom.py53CODE
LOWbenchs/bench_fw/utils.py178CODE
LOWdemos/offline_ivf/tests/testing_utils.py29CODE
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHcontrib/vecs_io.py85 Memory-mapped iterator over chunked .bvecs files. Iterates through all chunk files in order (chunk_0000.bvecs, STRING
Example Usage Blocks3 hits · 4 pts
SeverityFileLineSnippetContext
LOWfaiss/impl/ClusteringInitialization.h46/// Example usage:COMMENT
LOWfaiss/utils/extra_distances.h63/// Example usage:COMMENT
LOWdemos/index_pq_flat_separate_codes_from_codebook.py256# # Example usage:COMMENT
Slop Phrases3 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/test_build_blocks.py335 # make sure to test extreme casesCOMMENT
LOWtests/test_index_accuracy.py583 # make sure to test below and aboveCOMMENT
MEDIUMcontrib/rpc.py10This code is for demonstration purposes only, and does not include certainSTRING
Dead Code2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMbenchs/bench_fw/index.py149CODE
MEDIUMbenchs/bench_fw/index.py150CODE