Skip to content

fix(training): bound BulkTrainingRequest entries list size - #78

Open
madhugoutham wants to merge 1 commit into
llm-d:mainfrom
madhugoutham:fix/bound-bulk-training-request
Open

fix(training): bound BulkTrainingRequest entries list size#78
madhugoutham wants to merge 1 commit into
llm-d:mainfrom
madhugoutham:fix/bound-bulk-training-request

Conversation

@madhugoutham

Copy link
Copy Markdown
Member

What does this PR do?

  • Cap BulkTrainingRequest.entries at min_length=1, max_length=10000
  • Match the existing bound on BulkPredictionRequest.requests

Why is this change needed?

  • /add_training_data_bulk had no list-size limit; a large POST is fully parsed before per-bucket deques apply
  • EPP already limits flushes with MaxSampleSize (default 1000); this adds the same kind of server-side guard prediction already has

How was this tested?

  • Manual testing performed
    • Pydantic rejects 10001 entries and empty list; accepts size 1

Checklist

Related Issues

N/A

Mirror BulkPredictionRequest (max 10000) so oversized POSTs to
/add_training_data_bulk fail validation instead of materializing
unbounded lists in memory. EPP already caps flushes via MaxSampleSize.

Signed-off-by: Madhu Goutham Reddy Ambati <mambati@redhat.com>
@madhugoutham
madhugoutham requested a review from ahg-g as a code owner August 6, 2026 18:45
@github-actions

Copy link
Copy Markdown

This PR is marked as stale after 21d of inactivity. After an additional 14d of inactivity (7d to become rotten, then 7d more), it will be closed. To prevent this PR from being closed, add a comment or remove the lifecycle/stale label.

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.

1 participant