Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement C/C++ PairwiseANN and enable Python API #267

Closed
wants to merge 1 commit into from

Conversation

OctoberChang
Copy link
Contributor

Issue #, if available:

Description of changes:
Implement C/C++ Pairwise ANN and enable Python API

Python API Usage

  • train and save
train_params = PairwiseANN.TrainParams(metric_type="ip")
model = PairwiseANN.train(X_trn, Y_csr, train_params=train_params)
model.save(model_folder)
del model
  • load and predict
pred_params = PairwiseANN.PredParams(topk=10)
searchers = model.searchers_create(max_batch_size=250, max_only_topk=10, num_searcher=1)
It, Mt, Dt, Vt = model.predict(X_tst, label_keys, searchers, pred_params=pred_params, is_same_input=False)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@OctoberChang OctoberChang requested a review from rofuyu December 1, 2023 06:08
@OctoberChang OctoberChang self-assigned this Dec 1, 2023
@OctoberChang OctoberChang marked this pull request as draft December 1, 2023 20:09
@OctoberChang OctoberChang deleted the pairwise-ann-dev branch December 1, 2023 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant