Skip to content

Remove deprecated RerankerCalculator and update references#4087

Open
michalkulakowski wants to merge 7 commits intoopenvinotoolkit:mainfrom
SaumyaTiwari108:main
Open

Remove deprecated RerankerCalculator and update references#4087
michalkulakowski wants to merge 7 commits intoopenvinotoolkit:mainfrom
SaumyaTiwari108:main

Conversation

@michalkulakowski
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings March 25, 2026 14:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the deprecated MediaPipe RerankCalculator implementation and its associated proto/config artifacts, keeping the OpenVINO-based RerankCalculatorOV as the supported path.

Changes:

  • Deleted the deprecated RerankCalculator C++ implementation and its RerankCalculatorOptions proto.
  • Removed Bazel targets and server build references to the deprecated calculator.
  • Updated demos/test assets to stop exporting/whitelisting the deprecated calculator (but one test graph/config path still needs follow-up to stay consistent).

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
yarn.lock Adds missing lockfile entries for Bazel TypeScript deps (appears unrelated to rerank removal).
src/test/rerank/with_params/invalid_graph_ov.pbtxt Removes legacy RerankCalculator node from the invalid OV graph (currently leaves the graph incomplete).
src/test/rerank/with_params/invalid_graph.pbtxt Deletes legacy invalid graph using deprecated calculator.
src/test/rerank/with_params/graph.pbtxt Deletes legacy graph using deprecated calculator.
src/test/mediapipeflow_test.cpp Removes RerankCalculator from the registered-calculators whitelist test.
src/rerank/rerank_calculator.proto Deletes deprecated calculator options proto.
src/rerank/rerank_calculator.cc Deletes deprecated calculator implementation.
src/rerank/BUILD Removes Bazel targets for deprecated calculator/proto.
src/BUILD Removes deprecated calculator from server deps.
demos/common/export_models/export_model.py Removes deprecated rerank export subcommand/templates, leaving rerank_ov.

SaumyaTiwari108 and others added 2 commits March 26, 2026 14:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
max_allowed_chunks: 4
max_position_embeddings: 8 # invalid due to number of special tokens (4) + space for query (4) = 8, no space for document
}
calculator: "RerankCalculatorOV"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should look like src/test/rerank/graph_ov.pbtxt but with max_allowed_chunks and max_position_embeddings parameters

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood! I had blindly accepted the automated GitHub Copilot PR reviewer suggestion to fix the missing node ,I'll update this file to match your instructions

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both OpenVINOModelServerSessionCalculator's should be removed since RerankCalculatorOV does not use them

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done...please check once

source-map-support "0.5.9"
tsutils "3.21.0"

"@bazel/worker@5.7.2":
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SaumyaTiwari108 please explain these changes

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, My apology sir! My codespace environment accidentally auto-updated this file in the background and it slipped into the commit. I did not mean to change this. I will revert 'yarn.lock' back to the original main branch version right now.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. please revert then

@SaumyaTiwari108
Copy link
Copy Markdown

Sir @michalkulakowski,
I'm really sorry but I'm not able to understand why it's failing(1 failing check)

I want to contribute but seems like I'm not capable enough...can you please help me out to make me capable to contribute for your organisation if not this year(gsoc) then next year...

@dkalinowski
Copy link
Copy Markdown
Collaborator

dkalinowski commented Mar 30, 2026

@SaumyaTiwari108
These are unit tests that are failing:


[2026-03-26T18:09:05.985Z] [  FAILED  ] RerankHttpTestInstances/RerankHttpTest.simplePositive/0, where GetParam() = "rerank"

[2026-03-26T18:09:05.986Z] [  FAILED  ] RerankHttpTestInstances/RerankHttpTest.positiveTopN/0, where GetParam() = "rerank"

[2026-03-26T18:09:05.986Z] [  FAILED  ] RerankHttpTestInstances/RerankHttpTest.positiveReturnDocuments/0, where GetParam() = "rerank"

[2026-03-26T18:09:05.986Z] [  FAILED  ] RerankWithParamsHttpTestInstances/RerankWithParamsHttpTest.PositiveMaxAllowedChunksNotExceeded/0, where GetParam() = "rerank"

[2026-03-26T18:09:05.986Z] [  FAILED  ] RerankWithParamsHttpTestInstances/RerankWithParamsHttpTest.MaxAllowedChunksExceededByDocumentsBeforeChunking/0, where GetParam() = "rerank"

[2026-03-26T18:09:05.986Z] [  FAILED  ] RerankWithParamsHttpTestInstances/RerankWithParamsHttpTest.MaxAllowedChunksExceededAfterChunking/0, where GetParam() = "rerank"

[2026-03-26T18:09:05.986Z] [  FAILED  ] RerankWithInvalidParamsHttpTestInstances/RerankWithInvalidParamsHttpTest.AnyRequestNegativeWithInvalidSetup/0, where GetParam() = "rerank"

[2026-03-26T18:09:05.986Z] [  FAILED  ] RerankWithInvalidParamsHttpTestInstances/RerankWithInvalidParamsHttpTest.AnyRequestNegativeWithInvalidSetup/1, where GetParam() = "rerank_ov"

You can run unit tests yourself and debug further.
Here is documentation how to build image yourself and also how to run single unit test: https://github.com/openvinotoolkit/model_server/blob/main/docs/developer_guide.md

It looks like you forgot to remove unit tests from the source file. But please verify yourself as well :)

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.

4 participants