Skip to content

latencypredictor: prediction server perf + mean + ensemble#2488

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
tomatillo-and-multiverse:prediction-server-perf
Mar 10, 2026
Merged

latencypredictor: prediction server perf + mean + ensemble#2488
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
tomatillo-and-multiverse:prediction-server-perf

Conversation

@kaushikmitr

Copy link
Copy Markdown
Contributor

Summary

  • Add predict_batch_fast() that extracts columns via np.fromiter and builds pd.DataFrame(dict_of_arrays) instead of pd.DataFrame(list_of_dicts), reducing /predict/bulk/strict latency by ~41% (82ms → 48ms at 10k QPS)
  • Add orjson + ORJSONResponse for faster JSON serialization of bulk prediction responses
  • Add ObjectiveType (mean/quantile) support to match training server changes
  • Add QueueGatedModel ensemble support — prediction server loads gated models, routes to noqueue/queued sub-models based on num_request_waiting
  • Add is_queued binary feature and _prepare_features_for_ensemble() to match training server feature engineering

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 5, 2026
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 5, 2026
@netlify

netlify Bot commented Mar 5, 2026

Copy link
Copy Markdown

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit ba9701a
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/69a8cb20fe15f60008bb0614
😎 Deploy Preview https://deploy-preview-2488--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines -248 to +259
waiting = i % 10 + 1
tokens = waiting
waiting = i % 10 # Include 0 to provide noqueue training data for ensemble
tokens = max(waiting, 1)

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.

What does the comment about including 0 here mean if we then cap the minimum at 1?

@kaushikmitr kaushikmitr Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh previously waiting was >= 1, now we want to add 0 because that will trigger the no queue model

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.

Got it

@BenjaminBraunDev BenjaminBraunDev 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

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 10, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenjaminBraunDev, kaushikmitr

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

@k8s-ci-robot
k8s-ci-robot merged commit 2dc8b8a into kubernetes-sigs:main Mar 10, 2026
11 checks passed
BizerNotNull pushed a commit to BizerNotNull/gateway-api-inference-extension that referenced this pull request Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants