diff --git a/API.md b/API.md index c0c70a9..901050e 100644 --- a/API.md +++ b/API.md @@ -61,12 +61,15 @@ GET /_status/{job_id} Request Response: { "task_status" : "String", //RUNNING_INDEX_BUILD, FAILED_INDEX_BUILD, COMPLETED_INDEX_BUILD - "index_path" : "String" // Null if not completed + "file_name" : "String" "error_message": "String" } ``` -Client can expect an error in “error_message” if task_status == `FAILED_INDEX_BUILD`. +* Client can expect an error in `error_message` if `task_status` == `FAILED_INDEX_BUILD`. +* If `task_status` == `COMPLETED_INDEX_BUILD`, then `file_name` is the name of the index file, located +in the same root remote store path as the `vector_path`. + * Otherwise, `file_name` is `null`. #### Error codes diff --git a/remote_vector_index_builder/core/common/models/index_build_parameters.py b/remote_vector_index_builder/core/common/models/index_build_parameters.py index e09f433..274072f 100644 --- a/remote_vector_index_builder/core/common/models/index_build_parameters.py +++ b/remote_vector_index_builder/core/common/models/index_build_parameters.py @@ -18,16 +18,10 @@ class DataType(str, Enum): """Supported data types for vector values. Attributes: - FLOAT32: 32-bit floating point values - FLOAT16: 16-bit floating point values - BYTE: 8-bit integer values - BINARY: Binary data format + FLOAT: 32-bit floating point values """ - FLOAT32 = "fp32" - FLOAT16 = "fp16" - BYTE = "byte" - BINARY = "binary" + FLOAT = "float" class SpaceType(str, Enum): @@ -35,19 +29,11 @@ class SpaceType(str, Enum): Attributes: L2: Euclidean distance - COSINESIMIL: Cosine similarity - L1: Manhattan distance - LINF: Chebyshev distance INNERPRODUCT: Dot product similarity - HAMMING: Hamming distance for binary vectors """ L2 = "l2" - COSINESIMIL = "cosinesimil" - L1 = "l1" - LINF = "linf" INNERPRODUCT = "innerproduct" - HAMMING = "hamming" class Algorithm(str, Enum): @@ -145,7 +131,7 @@ class IndexBuildParameters(BaseModel): tenant_id: str = "" dimension: int = Field(gt=0) doc_count: int = Field(gt=0) - data_type: DataType = DataType.FLOAT32 + data_type: DataType = DataType.FLOAT engine: Engine = Engine.FAISS index_parameters: IndexParameters = Field(default_factory=IndexParameters) model_config = ConfigDict(extra="forbid") diff --git a/remote_vector_index_builder/core/common/models/vectors_dataset.py b/remote_vector_index_builder/core/common/models/vectors_dataset.py index cc73d42..4e886b2 100644 --- a/remote_vector_index_builder/core/common/models/vectors_dataset.py +++ b/remote_vector_index_builder/core/common/models/vectors_dataset.py @@ -47,14 +47,8 @@ def get_numpy_dtype(dtype: DataType): Raises: UnsupportedVectorsDataTypeError: If the provided data type is not supported. """ - if dtype == DataType.FLOAT32: + if dtype == DataType.FLOAT: return "