docstr: Creates a KNN classifier model based on FAISS. FAISS allows you to compose different
  near-neighbor search algorithms from several different preprocessing / search algorithms
  This composition is specified by the string that is passed to the FAISS index_factory.
  Here are good guidelines for choosing the index string:
  https://github.com/facebookresearch/faiss/wiki/Guidelines-to-choose-an-index
  
  The model itself is a clone of the sklearn one
docstr_tok: ["Creates","a","KNN","classifier","model","based","on","FAISS",".","FAISS","allows","you","to","compose","different","near-neighbor","search","algorithms","from","several","different","preprocessing","\/","search","algorithms","This","composition","is","specified","by","the","string","that","is","passed","to","the","FAISS","index_factory",".","Here","are","good","guidelines","for","choosing","the","index","string",":","https",":","\/\/github.com\/facebookresearch\/faiss\/wiki\/Guidelines-to-choose-an-index","The","model","itself","is","a","clone","of","the","sklearn","one"]
code: def __init__(
      self,
      n_neighbors=5,
      weights="uniform",
      n_jobs=-1,
      index_factory_string="Flat",
  ):
      """
      Creates a KNN classifier model based on FAISS. FAISS allows you to compose different
      near-neighbor search algorithms from several different preprocessing / search algorithms
      This composition is specified by the string that is passed to the FAISS index_factory.
      Here are good guidelines for choosing the index string:
      https://github.com/facebookresearch/faiss/wiki/Guidelines-to-choose-an-index
  
      The model itself is a clone of the sklearn one
      """
      try_import_faiss()
      import faiss
  
      self.faiss = faiss
      self.index_factory_string = index_factory_string
      self.n_neighbors = n_neighbors
      self.weights = weights
      self.classes = []
      self.n_jobs = n_jobs
      if n_jobs > 0:
          # global config, affects all faiss indexes
          faiss.omp_set_num_threads(n_jobs)
  
imports: import logging
  import numpy
  from pandas import DataFrame
  from scipy.stats import mode
  from sklearn.utils.extmath import weighted_mode
  from autogluon.common.utils.try_import import try_import_faiss
label_desc: Use image node_id 1 to create a new FAISSNeighborsClassifier object  with example: obj = FAISSNeighborsClassifier(n_neighbors, weights, n_jobs, index_factory_string)