Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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