Skip to content

[BUG][Low]- Zero demo limit selects a bootstrapped demo #116

Open

Description

@arthurianresolve

Summary

With an initially demo-free module, setting MIPROv2.max_bootstrapped_demos(0) can still select one harvested demo per eligible predictor. BootstrapFewShot.max_demos(0) has the same behavior. The shared selector pushes the first demo before checking whether the count has reached zero, so the configured limit is not honored.

Affected code

Suggested resolution

  • Return an empty demo map before iterating when max_per_predictor == 0.
  • Add a regression case with an eligible teacher span and a zero limit.

Acceptance criteria

  • A zero demo limit selects no bootstrapped demos for MIPROv2 or BootstrapFewShot.
  • Positive limits retain their existing score order and input deduplication.

Validation performed

Static review of upstream main at 72b247e2bddc7337f923461fb27b4127c7d104f3. A focused regression test of the selector passed locally. No live model call was needed.

AI disclosure

OpenAI Codex assisted with the source review, local fix, and issue drafting.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions