Commit Graph

14 Commits (7e7f94d738077f419662ad01393ee994390e8f92)

Author SHA1 Message Date
Michael Norris eff0898a13 Enable linting: lint config changes plus arc lint command (#3966)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3966

This actually enables the linting.

Manual changes:
- tools/arcanist/lint/fbsource-licenselint-config.toml
- tools/arcanist/lint/fbsource-lint-engine.toml

Automated changes:
`arc lint --apply-patches --take LICENSELINT --paths-cmd 'hg files faiss'`

Reviewed By: asadoughi

Differential Revision: D64484165

fbshipit-source-id: 4f2f6e953c94ef6ebfea8a5ae035ccfbea65ed04
2024-10-22 09:46:48 -07:00
Michael Norris 56a383f253 Resolve "duplicate-license-header": Find and replace duplicate license headers (#3967)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3967

This diff just finds and replaces duplicate license headers.

See the errors for "duplicate-license-header" in D64429711 under "linter-coverage-verification" signal.

Reviewed By: asadoughi

Differential Revision: D64484123

fbshipit-source-id: 906e8baa3a11a3bbee174a03dcc27681f9fd78c2
2024-10-21 08:26:22 -07:00
Matthijs Douze fd09e51316 move by_residual to IndexIVF (#2870)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2870

Factor by_residual for all the IndexIVF inheritors.
Some training code can be put in IndexIVF and `train_residual` is replaced with `train_encoder`.

This will be used for the IndependentQuantizer work.

Reviewed By: alexanderguzhva

Differential Revision: D45987304

fbshipit-source-id: 7310a687b556b2faa15a76456b1d9000e21b58ce
2023-05-23 09:56:19 -07:00
Kaelen Haag 24758fb27d Search params c_api implementation (#2732)
Summary:
https://github.com/facebookresearch/faiss/issues/2727

Implements search_with_params function on c_api for index.

Implemented c_api equivalents of SearchParameters and SearchParametersIVF.

My C/C++ is pretty rusty so I imagine my arguments to the new functions for each search parameters could be refined. Happy to take suggestions :)

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2732

Reviewed By: alexanderguzhva

Differential Revision: D43917264

Pulled By: mdouze

fbshipit-source-id: c9eaf0d96ec0fad4862528aac9b5946294f5e444
2023-03-09 15:30:19 -08:00
Alexander Andreev f6d2efd1df Cover more types for C_API (#1917)
Summary:
Exported some global variables and statistics.
Supported downcast for IndexIDMap and IndexIDMap2 from faiss::Index
Fixes https://github.com/facebookresearch/faiss/issues/1863

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1917

Reviewed By: beauby

Differential Revision: D28834039

Pulled By: mdouze

fbshipit-source-id: c1f7739dcdc23055780ebc665082609641dff861
2021-06-08 15:34:05 -07:00
Alexander Andreev b209361f7b Add setters for IndexIVF* indexes (#1827)
Summary:
This PR gives users control over resources

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1827

Reviewed By: beauby

Differential Revision: D27904561

Pulled By: mdouze

fbshipit-source-id: 61352f776971d9f488917e39f8746d43614386d9
2021-04-22 05:22:40 -07:00
Alexander Andreev d77169173e Add getters for c_api IndexIVFFlat (#1787)
Summary:
ref https://github.com/facebookresearch/faiss/issues/1756

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1787

Reviewed By: beauby

Differential Revision: D27619587

Pulled By: mdouze

fbshipit-source-id: 0a9bb12f27b48c1b21025957e26c7453ab64a78d
2021-04-08 03:01:53 -07:00
Alexander Andreev fe7b06197e IndexIVFFlat inherited from Index for c_api (#1764)
Summary:
ref https://github.com/facebookresearch/faiss/issues/1756

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1764

Reviewed By: beauby

Differential Revision: D27152915

Pulled By: mdouze

fbshipit-source-id: 5e4ed9e861ff63fc95f92644f58ee8c7f98ca052
2021-03-18 02:36:51 -07:00
Lucas Hosseini e86bf8cae1 Enable clang-format + autofix.
Summary: Format whole codebase with clang-format.

Reviewed By: mdouze

Differential Revision: D22891341

fbshipit-source-id: 673032b2444d61026d1e2c3fa2c5659f178cf58b
2021-02-25 04:46:10 -08:00
Danil Guskov 7e08db7cb7
c_api: faiss_IndexIVF_invlists_get_ids function (#1094)
If @Enet4 approves it's fine with me.

* c_api: faiss_IndexIVF_invlists_get_ids function

* Update c_api/IndexIVF_c.h

Co-Authored-By: Eduardo Pinho <enet4mikeenet@gmail.com>

Co-authored-by: Eduardo Pinho <enet4mikeenet@gmail.com>
2020-01-31 13:40:28 +01:00
Eduardo Pinho 828dcea400 [C API] June 2019 update (#869)
* [c_api] use all relevant flags in compilation

* [c_api] Remove redundant IndexIVFFlat declarations

- From IndexIVF_c.h, already declared in IndexIVFFlat_c.h

* [c_api] type changes

- replace `long` with a more suitable type
- provide definitions for `faiss_component_t` and `faiss_distance_t`

* [c_api] Define CFLAGS and CUDACFLAGS
2019-06-24 13:29:38 +02:00
Eduardo Pinho 2bfbead8f1 [C API] Update for compatibility with v1.5 (#858)
* [c_api] Update impl and interface for v1.5

- move IndexShards to dedicated module IndexShards_c.{h|cpp}
- remove getter/setters to unreachable fields
- reimplement faiss_IndexIVF_imbalance_factor (to use invlists)
- minor IndexIVF documentation tweaks
- Remove QueryResult, provide RangeQueryResult

* [c_api] Document FaissErrorCode

* [c_api] Update GPU impl and interface for v1.5

- Remove unavailable method setTempMemoryFraction

* [c_api] Relicense to MIT

In accordance to the rest of the project
2019-06-12 15:46:08 +02:00
Eduardo Pinho 9efdd8d427 [C API] Additional API coverage: IndexLSH, I/O, meta-indexes (#425)
* [c_api] leverage index downcast

- make index downcast declaration+definition possible with macros
- use macros on existing index types

* [c_api] Add IndexLSH to C API

* [c_api] Add Index IO interface

- new header index_io_c.h for access to the index_io.h API
- function`faiss_write_index` and overloads for dumping index to a file
- function`faiss_read_index` and overloads for reading index from a file
- function`faiss_clone_index` for cloning an index
- update C example to save index to a file

* [c_api] Add IndexIDMap and IndexShards API
2018-05-02 13:39:59 +02:00
Eduardo Pinho de0541c365 Add C API (#317)
* Add C API

* Add installation instructions for the C API
2018-02-26 11:23:17 +01:00