Skip to content

Fix prompt tuning sampling error when LIMIT is greater than number of…#1954

Open
billierinaldi wants to merge 1 commit intomicrosoft:mainfrom
billierinaldi:billierinaldi/fix-limit
Open

Fix prompt tuning sampling error when LIMIT is greater than number of…#1954
billierinaldi wants to merge 1 commit intomicrosoft:mainfrom
billierinaldi:billierinaldi/fix-limit

Conversation

@billierinaldi
Copy link

Description

Prompt tuning errors out when the number of chunks is less than the default LIMIT, saying
"Auto-prompt generation failed: Cannot take a larger sample than population when 'replace=False'"

Proposed Changes

This patch sets the limit to the min of LIMIT and the number of chunks.

Checklist

  • I have tested these changes locally.
  • I have reviewed the code changes.
  • I have updated the documentation (if necessary).
  • I have added appropriate unit tests (if applicable).

@billierinaldi billierinaldi requested a review from a team as a code owner May 28, 2025 20:48
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