Skip to content

MIPROv2 Updates #8166

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

Merged
merged 2 commits into from
May 3, 2025
Merged

MIPROv2 Updates #8166

merged 2 commits into from
May 3, 2025

Conversation

klopsahlong
Copy link
Collaborator

@klopsahlong klopsahlong commented May 3, 2025

  1. Updating MIPROv2 to have the following behavior:
  • Auto is on by default (DONE)
  • All auto-dependent kwargs are None by default
  • If Auto is ON, raise error if any kwarg is set
  • If Auto is OFF, raise error if any kwarg is not set
  1. Changes the log base 2 in the num_trials calculation, as was originally intended.
  2. Adds a time out to the cost user message to proceed after 20 seconds if no input is received

num_fewshot_candidates: Optional[int] = None,
num_instruct_candidates: Optional[int] = None,
auto: Optional[Literal["light", "medium", "heavy"]] = "light",
num_candidates: Optional[int] = None,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Setting auto back to light as default & making num_candidates=None by default. I also removed setting num_fewshot & num_instruct_candidates from init, since this overcomplicates the logic of the error message below and was not available to users before anyways.

num_vars *= 2 # Account for few-shot examples + instruction variables
# Trials = MAX(c*M*log(N), c=2, 3/2*N)
num_trials = int(max(2 * num_vars * np.log2(num_candidates), 1.5 * num_candidates))

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: this both refactors the num_trials calculator as a helper function, so that we can use it in the error message as well, AND changes np.log --> np.log2.

@klopsahlong klopsahlong changed the title adding in error messages & timeout for user permission message MIPROv2 Updates May 3, 2025
@klopsahlong klopsahlong marked this pull request as ready for review May 3, 2025 19:51
@okhat okhat merged commit bb5f0d1 into main May 3, 2025
3 checks passed
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.

2 participants