NVIDIA / NVIDIA/cuvs

[FEA] Remove cuvsCagraCompressionParams and only use cuvsProductQuantizerParams

Open
#2,613 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Cuda
Stars
854
Forks
236
Avg merge
3d 3h
Merged PRs (30d)
62

Description

TLDR: We have repetitive params that do the same thing.
CompressionParams/cuvsCagraCompressionParams (in index header file c/include/cuvs/neighbors/cagra.h)
PqParams/cuvsProductQuantizerParams (in quantizer header file c/include/cuvs/preprocessing/quantize/pq.h)

Historical reason:
CompressionParams was historically a property of the index and a duplicate of pqParams/cuvsProductQuantizerParams since index previously constructed a compressed dataset internally (hence it was a property of index).

However, now since we added the dataset API which leaves it to the user to construct a compressed quantized dataset themselves outside of the index through a dataset factory, this decouples compression from the index (compression is no longer an index property).

Solution: delete CompressionParams and only use pqParams/cuvsProductQuantizerParams (which is a dataset property and is located in the quantizer header file).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with c/include/cuvs/neighbors/cagra.h and c/include/cuvs/preprocessing/quantize/pq.h, then trace references to CompressionParams, cuvsCagraCompressionParams, PqParams, and cuvsProductQuantizerParams. Review the affected index and dataset API usage before removing the duplicate compression parameters. Done means the index no longer exposes CompressionParams and the product-quantizer parameters are used consistently.

Written by the indexing model from the issue text.

Assessment

Domain
backend-api-design
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.