mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-08-10 00:29:40 +01:00
Update vector embed policy remove preview and make spherical default (#2555)
This commit is contained in:
@@ -166,7 +166,7 @@ export const VectorEmbeddingPoliciesComponent: FunctionComponent<IVectorEmbeddin
|
||||
indexType: matchingType || "none",
|
||||
indexingSearchListSize: matchingIndex?.indexingSearchListSize || undefined,
|
||||
quantizationByteSize: matchingIndex?.quantizationByteSize || undefined,
|
||||
quantizerType: supportsQuantizer ? matchingIndex?.quantizerType || "product" : undefined,
|
||||
quantizerType: supportsQuantizer ? matchingIndex?.quantizerType || "spherical" : undefined,
|
||||
vectorIndexShardKey: matchingIndex?.vectorIndexShardKey || undefined,
|
||||
pathError: onVectorEmbeddingPathError(embedding.path),
|
||||
dimensionsError: onVectorEmbeddingDimensionError(embedding.dimensions, matchingIndex?.type || "none"),
|
||||
@@ -256,7 +256,7 @@ export const VectorEmbeddingPoliciesComponent: FunctionComponent<IVectorEmbeddin
|
||||
vectorEmbedding.indexingSearchListSize = undefined;
|
||||
}
|
||||
if (supportsQuantization(vectorEmbedding.indexType)) {
|
||||
vectorEmbedding.quantizerType = vectorEmbedding.quantizerType || "product";
|
||||
vectorEmbedding.quantizerType = vectorEmbedding.quantizerType || "spherical";
|
||||
} else {
|
||||
vectorEmbedding.quantizerType = undefined;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { IDropdownOption } from "@fluentui/react";
|
||||
import { VectorIndex } from "Contracts/DataModels";
|
||||
import { Keys, t } from "Localization";
|
||||
|
||||
const dataTypes = ["float32", "uint8", "int8", "float16"];
|
||||
const distanceFunctions = ["euclidean", "cosine", "dotproduct"];
|
||||
@@ -10,8 +9,8 @@ export const getDataTypeOptions = (): IDropdownOption[] => createDropdownOptions
|
||||
export const getDistanceFunctionOptions = (): IDropdownOption[] => createDropdownOptionsFromLiterals(distanceFunctions);
|
||||
export const getIndexTypeOptions = (): IDropdownOption[] => createDropdownOptionsFromLiterals(indexTypes);
|
||||
export const getQuantizerTypeOptions = (): IDropdownOption[] => [
|
||||
{ key: "spherical", text: "Spherical" },
|
||||
{ key: "product", text: "Product" },
|
||||
{ key: "spherical", text: `Spherical (${t(Keys.common.preview)})` },
|
||||
];
|
||||
|
||||
export const supportsQuantization = (indexType: VectorIndex["type"] | "none" | undefined): boolean =>
|
||||
|
||||
@@ -990,6 +990,8 @@
|
||||
"quantizationByteSizeTooltipContainerName": "container",
|
||||
"quantizationByteSizeTooltipGlobalSecondaryIndexName": "global secondary index",
|
||||
"quantizerType": "Quantizer type",
|
||||
"quantizerTypeProduct": "Product",
|
||||
"quantizerTypeSpherical": "Spherical",
|
||||
"quantizerTypeTooltip": "The quantization method used by the vector index.",
|
||||
"indexingSearchListSize": "Indexing search list size",
|
||||
"vectorIndexShardKey": "Vector index shard key",
|
||||
|
||||
Reference in New Issue
Block a user