faiss 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +6 -0
 - data/ext/faiss/index.cpp +16 -2
 - data/lib/faiss/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: '02752578b25cfcc61a7bb0e06e1d0dbc2d78175796cf99a44184a4e7298de073'
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: ec678cf766efa90be0e013b342be6f95e42c6e67c4aa6de1b9e3b6f4c59d8699
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 9342c736f6ce775b8561f0fc066b565e38f8d38470f98ea51b9635f371bb8efdbb9e049874588847fb11360da006da3ec0ca28d44fc6f844d970d91f648f1b03
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: e70f220fdc76a37fcf5a06beba2b07f0315bbbb3dab7b396a8f932c04746e11454bd57ed527d18d55436352bd823d1e33e341046697fd36b124f7e64fbb72f38
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/ext/faiss/index.cpp
    CHANGED
    
    | 
         @@ -8,6 +8,7 @@ 
     | 
|
| 
       8 
8 
     | 
    
         
             
            #include <faiss/IndexIVFPQ.h>
         
     | 
| 
       9 
9 
     | 
    
         
             
            #include <faiss/IndexIVFPQR.h>
         
     | 
| 
       10 
10 
     | 
    
         
             
            #include <faiss/index_io.h>
         
     | 
| 
      
 11 
     | 
    
         
            +
            #include <faiss/AutoTune.h>
         
     | 
| 
       11 
12 
     | 
    
         | 
| 
       12 
13 
     | 
    
         
             
            #include <rice/Array.hpp>
         
     | 
| 
       13 
14 
     | 
    
         
             
            #include <rice/Constructor.hpp>
         
     | 
| 
         @@ -75,6 +76,11 @@ void init_index(Rice::Module& m) { 
     | 
|
| 
       75 
76 
     | 
    
         
             
                    ret.push(lstr);
         
     | 
| 
       76 
77 
     | 
    
         
             
                    return ret;
         
     | 
| 
       77 
78 
     | 
    
         
             
                  })
         
     | 
| 
      
 79 
     | 
    
         
            +
                .define_method(
         
     | 
| 
      
 80 
     | 
    
         
            +
                  "nprobe=",
         
     | 
| 
      
 81 
     | 
    
         
            +
                  *[](faiss::Index &self, double val) {
         
     | 
| 
      
 82 
     | 
    
         
            +
                    faiss::ParameterSpace().set_index_parameter(&self, "nprobe", val);
         
     | 
| 
      
 83 
     | 
    
         
            +
                  })
         
     | 
| 
       78 
84 
     | 
    
         
             
                .define_method(
         
     | 
| 
       79 
85 
     | 
    
         
             
                  "save",
         
     | 
| 
       80 
86 
     | 
    
         
             
                  *[](faiss::Index &self, const char *fname) {
         
     | 
| 
         @@ -96,7 +102,7 @@ void init_index(Rice::Module& m) { 
     | 
|
| 
       96 
102 
     | 
    
         
             
                .define_constructor(Rice::Constructor<faiss::IndexHNSWFlat, int, int, faiss::MetricType>(), (Rice::Arg("d"), Rice::Arg("M"), Rice::Arg("metric") = faiss::METRIC_L2));
         
     | 
| 
       97 
103 
     | 
    
         | 
| 
       98 
104 
     | 
    
         
             
              Rice::define_class_under<faiss::IndexIVFFlat, faiss::Index>(m, "IndexIVFFlat")
         
     | 
| 
       99 
     | 
    
         
            -
                .define_constructor(Rice::Constructor<faiss::IndexIVFFlat, faiss::Index*, size_t, size_t>());
         
     | 
| 
      
 105 
     | 
    
         
            +
                .define_constructor(Rice::Constructor<faiss::IndexIVFFlat, faiss::Index*, size_t, size_t, faiss::MetricType>(), (Rice::Arg("quantizer"), Rice::Arg("d"), Rice::Arg("nlist"), Rice::Arg("metric") = faiss::METRIC_L2));
         
     | 
| 
       100 
106 
     | 
    
         | 
| 
       101 
107 
     | 
    
         
             
              Rice::define_class_under<faiss::IndexLSH, faiss::Index>(m, "IndexLSH")
         
     | 
| 
       102 
108 
     | 
    
         
             
                .define_constructor(Rice::Constructor<faiss::IndexLSH, int64_t, int>());
         
     | 
| 
         @@ -111,8 +117,16 @@ void init_index(Rice::Module& m) { 
     | 
|
| 
       111 
117 
     | 
    
         
             
                .define_constructor(Rice::Constructor<faiss::IndexIVFScalarQuantizer, faiss::Index*, size_t, size_t, faiss::ScalarQuantizer::QuantizerType>());
         
     | 
| 
       112 
118 
     | 
    
         | 
| 
       113 
119 
     | 
    
         
             
              Rice::define_class_under<faiss::IndexIVFPQ, faiss::Index>(m, "IndexIVFPQ")
         
     | 
| 
       114 
     | 
    
         
            -
                .define_constructor(Rice::Constructor<faiss::IndexIVFPQ, faiss::Index*, size_t, size_t, size_t, size_t>());
         
     | 
| 
      
 120 
     | 
    
         
            +
                .define_constructor(Rice::Constructor<faiss::IndexIVFPQ, faiss::Index*, size_t, size_t, size_t, size_t, faiss::MetricType>(), (Rice::Arg("quantizer"), Rice::Arg("d"), Rice::Arg("nlist"), Rice::Arg("M"), Rice::Arg("nbits_per_idx"), Rice::Arg("metric") = faiss::METRIC_L2));
         
     | 
| 
       115 
121 
     | 
    
         | 
| 
       116 
122 
     | 
    
         
             
              Rice::define_class_under<faiss::IndexIVFPQR, faiss::Index>(m, "IndexIVFPQR")
         
     | 
| 
       117 
123 
     | 
    
         
             
                .define_constructor(Rice::Constructor<faiss::IndexIVFPQR, faiss::Index*, size_t, size_t, size_t, size_t, size_t, size_t>());
         
     | 
| 
      
 124 
     | 
    
         
            +
             
     | 
| 
      
 125 
     | 
    
         
            +
              Rice::define_class_under<faiss::ParameterSpace>(m, "ParameterSpace")
         
     | 
| 
      
 126 
     | 
    
         
            +
                .define_constructor(Rice::Constructor<faiss::ParameterSpace>())
         
     | 
| 
      
 127 
     | 
    
         
            +
                .define_method(
         
     | 
| 
      
 128 
     | 
    
         
            +
                  "set_index_parameter",
         
     | 
| 
      
 129 
     | 
    
         
            +
                  *[](faiss::ParameterSpace& self, faiss::Index* index, const std::string& name, double val) {
         
     | 
| 
      
 130 
     | 
    
         
            +
                    self.set_index_parameter(index, name, val);
         
     | 
| 
      
 131 
     | 
    
         
            +
                  });
         
     | 
| 
       118 
132 
     | 
    
         
             
            }
         
     | 
    
        data/lib/faiss/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: faiss
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.6
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Andrew Kane
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2021-03- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-03-21 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rice
         
     |