Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

def build_index(args, data_loader, model):

index = hnswlib.Index(space='ip', dim=args.output_emb_size)
index = hnswlib.Index(
space='ip',
dim=args.output_emb_size if args.output_emb_size > 0 else 768)

# Initializing index
# max_elements - the maximum number of elements (capacity). Will throw an exception if exceeded
Expand Down
4 changes: 3 additions & 1 deletion applications/question_answering/faq_finance/ann_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

def build_index(args, data_loader, model):

index = hnswlib.Index(space='ip', dim=args.output_emb_size)
index = hnswlib.Index(
space='ip',
dim=args.output_emb_size if args.output_emb_size > 0 else 768)

# Initializing index
# max_elements - the maximum number of elements (capacity). Will throw an exception if exceeded
Expand Down
4 changes: 3 additions & 1 deletion applications/question_answering/faq_system/ann_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

def build_index(args, data_loader, model):

index = hnswlib.Index(space='ip', dim=args.output_emb_size)
index = hnswlib.Index(
space='ip',
dim=args.output_emb_size if args.output_emb_size > 0 else 768)

# Initializing index
# max_elements - the maximum number of elements (capacity). Will throw an exception if exceeded
Expand Down