Skip to content

Commit 5b58220

Browse files
bshethmetafacebook-github-bot
authored andcommitted
Back out "Add warning on adding nbits to LSH index factory" (facebookresearch#3690)
Summary: Pull Request resolved: facebookresearch#3690 Seems like this may not be necessary because it is the the expected behavior. See: facebookresearch#3687 (comment) Reviewed By: asadoughi Differential Revision: D60241747 fbshipit-source-id: 7b8780fc4922a58c1975ae1b4343dc87e0eda0e1
1 parent feb3eca commit 5b58220

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

faiss/index_factory.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -531,15 +531,7 @@ Index* parse_other_indexes(
531531

532532
// IndexLSH
533533
if (match("LSH([0-9]*)(r?)(t?)")) {
534-
int nbits;
535-
if (sm[1].length() > 0) {
536-
nbits = std::stoi(sm[1].str());
537-
} else {
538-
nbits = d;
539-
fprintf(stderr,
540-
"WARN: nbits not specified, defaulting to d = %d\n",
541-
d);
542-
}
534+
int nbits = sm[1].length() > 0 ? std::stoi(sm[1].str()) : d;
543535
bool rotate_data = sm[2].length() > 0;
544536
bool train_thresholds = sm[3].length() > 0;
545537
FAISS_THROW_IF_NOT(metric == METRIC_L2);

0 commit comments

Comments
 (0)