Skip to content

Add sentinels to index format enums.#4907

Closed
scsiguy wants to merge 2 commits into
facebookresearch:mainfrom
scsiguy:export-D96032245
Closed

Add sentinels to index format enums.#4907
scsiguy wants to merge 2 commits into
facebookresearch:mainfrom
scsiguy:export-D96032245

Conversation

@scsiguy
Copy link
Copy Markdown
Contributor

@scsiguy scsiguy commented Mar 11, 2026

Summary:
The sentinels will be used to detect drift between index formats
and test coverage.

The MetricType enum is handled differently since it is discontiguous.
The metric_type_count() method computes the count of enum entries which
is likely to change should additional types be added.

Reviewed By: mnorris11

Differential Revision: D96032245

scsiguy added 2 commits March 11, 2026 09:21
…ebookresearch#4902)

Summary:

When enabled, throw a FAISS exception when index deserialization loops
driven by read data fields (nlist, nsplits, VT chain length, nhash, etc.)
exceed a configured limit.  This can be set by input validation tests to
prevent wasting time on pathological, OOM inducting, inputs.

Default: 0 (no limit).

Differential Revision: D96016580
Summary:
The sentinels will be used to detect drift between index formats
and test coverage.

The MetricType enum is handled differently since it is discontiguous.
The metric_type_count() method computes the count of enum entries which
is likely to change should additional types be added.

Reviewed By: mnorris11

Differential Revision: D96032245
@meta-cla meta-cla Bot added the CLA Signed label Mar 11, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Mar 11, 2026

@scsiguy has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96032245.

@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Mar 12, 2026

This pull request has been merged in 0fcba22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants