Skip to content

feat(catalog): add orderBy=RECOMMENDED to findModels, deprecate recommendations param - #2819

Merged
google-oss-prow[bot] merged 1 commit into
kubeflow:mainfrom
pboyd:order-by-recommended
Jun 18, 2026
Merged

feat(catalog): add orderBy=RECOMMENDED to findModels, deprecate recommendations param#2819
google-oss-prow[bot] merged 1 commit into
kubeflow:mainfrom
pboyd:order-by-recommended

Conversation

@pboyd

@pboyd pboyd commented Jun 11, 2026

Copy link
Copy Markdown
Member

Description

Passing recommendations=true to GET /api/model_catalog/v1alpha1/models was confusing because it prevented using orderBy. This change makes orderBy=RECOMMENDED equivalent: Pareto filtering is applied and models are sorted by recommended latency, with sortOrder honored (ASC = lowest latency
first, DESC = highest latency first).

The recommendations boolean parameter is retained for backward compatibility but marked deprecated in the OpenAPI spec.

How Has This Been Tested?

Compared the output of recommendations=true and orderBy=RECOMMENDED and verified there was no difference.

Merge criteria:

  • All the commits have been signed-off (To pass the DCO check)
  • The commits have meaningful messages
  • Automated tests are provided as part of the PR for major new functionalities; testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work.
  • Code changes follow the kubeflow contribution guidelines.

…mendations param

Passing recommendations=true to GET /api/model_catalog/v1alpha1/models was
confusing because it prevented using orderBy. This change makes
orderBy=RECOMMENDED equivalent: Pareto filtering is applied and models are
sorted by recommended latency, with sortOrder honored (ASC = lowest latency
first, DESC = highest latency first).

The recommendations boolean parameter is retained for backward compatibility
but marked deprecated in the OpenAPI spec. Note that sortOrder is now honored
when recommendations=true as well; the default ASC behavior is unchanged.

Assisted-by: Claude Opus 4.6
Signed-off-by: Paul Boyd <paul@pboyd.io>
@pboyd
pboyd force-pushed the order-by-recommended branch from 442d189 to 33352a9 Compare June 16, 2026 16:30
@pboyd
pboyd marked this pull request as ready for review June 16, 2026 16:30
@adysenrothman
adysenrothman requested a review from Copilot June 18, 2026 20:01

@adysenrothman adysenrothman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm
/approve

@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adysenrothman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow
google-oss-prow Bot merged commit de0b71f into kubeflow:main Jun 18, 2026
24 of 25 checks passed
@pboyd
pboyd removed the request for review from Copilot June 18, 2026 20:26
@pboyd
pboyd deleted the order-by-recommended branch June 18, 2026 20:30
manaswinidas added a commit to manaswinidas/model-registry that referenced this pull request Jul 10, 2026
…sort

Make performanceParams.orderBy dynamic: default to RECOMMENDED (Pareto
filtering from PR kubeflow#2819) and switch to cold_start_time_to_load_seconds
only when the "Lowest Cold Start" sort option is selected.

Assisted-by: Claude
Signed-off-by: manaswinidas <dasmanaswini10@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
manaswinidas added a commit to manaswinidas/model-registry that referenced this pull request Jul 14, 2026
…sort

Make performanceParams.orderBy dynamic: default to RECOMMENDED (Pareto
filtering from PR kubeflow#2819) and switch to cold_start_time_to_load_seconds
only when the "Lowest Cold Start" sort option is selected.

Assisted-by: Claude
Signed-off-by: manaswinidas <dasmanaswini10@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
google-oss-prow Bot pushed a commit that referenced this pull request Jul 21, 2026
…RECOMMENDED (#2889)

* feat(ui): migrate model catalog from recommendations=true to orderBy=RECOMMENDED

Replace deprecated `recommendations: true` with `orderBy: 'RECOMMENDED'`
in the models API call for performance view. The performance artifacts
endpoint (used by PerformanceInsightsView and ModelCatalogCardBody) is
unaffected.

Assisted-by: Claude
Signed-off-by: manaswinidas <dasmanaswini10@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: manaswinidas <dasmanaswini10@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(ui): use orderBy=cold_start_time_to_load_seconds for cold start sort

Make performanceParams.orderBy dynamic: default to RECOMMENDED (Pareto
filtering from PR #2819) and switch to cold_start_time_to_load_seconds
only when the "Lowest Cold Start" sort option is selected.

Assisted-by: Claude
Signed-off-by: manaswinidas <dasmanaswini10@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(ui): remove recommendations=true from performance artifacts, fix card sort

- Remove deprecated `recommendations: true` from all performance artifact
  API calls (ModelCatalogCardBody, PerformanceInsightsView, hook, service,
  type definition)
- Fix card body to pull `sortBy` from ModelCatalogContext and sort artifacts
  by cold_start ASC when "Lowest Cold Start" sort is active, so the
  displayed metric matches the model's gallery position
- Default card artifact fetch to `orderBy=RECOMMENDED` when no latency
  filter or cold start sort is active
- Update COLD_START_TIME_TO_LOAD enum value to use full artifact path

Assisted-by: Claude
Signed-off-by: manaswinidas <dasmanaswini10@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ui): prioritize cold start sort over latency in card artifacts

When sorting by "Lowest Cold Start", the card's /performance_artifacts
call now always orders by cold_start_time_to_load_seconds.double_value
regardless of whether a latency filter is active. Previously the latency
filter took priority, causing the displayed cold start metric to not
match the model's gallery position.

Also use stripArtifactsPrefix for the cold start orderBy value to match
the short-form format expected by the performance_artifacts endpoint
(cold_start_time_to_load_seconds.double_value, not
artifacts.cold_start_time_to_load_seconds.double_value).

Fix Cypress test that asserted recommendations=true (now removed).

Signed-off-by: manaswinidas <dasmanaswini10@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor(ui): remove DRY violation and fix stale references

- Remove duplicate SortField.COLD_START_TIME_TO_LOAD enum member; use
  ModelCatalogNumberFilterKey.COLD_START_LOAD_TIME directly (single
  source of truth for the field path)
- Strengthen Cypress test: assert orderBy= is present, not just that
  recommendations= is absent
- Update stale mock comment: recommendations=true → orderBy=RECOMMENDED

Signed-off-by: manaswinidas <dasmanaswini10@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Signed-off-by: manaswinidas <dasmanaswini10@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants