refactor(mmm): rename optimize_budget **minimize_kwargs to **allocate_budget_kwargs#2563
Open
anevolbap wants to merge 6 commits into
Open
refactor(mmm): rename optimize_budget **minimize_kwargs to **allocate_budget_kwargs#2563anevolbap wants to merge 6 commits into
anevolbap wants to merge 6 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2563 +/- ##
=======================================
Coverage 93.90% 93.90%
=======================================
Files 92 92
Lines 14089 14089
=======================================
Hits 13230 13230
Misses 859 859 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…_budget_kwargs
The variadic on BudgetOptimizerWrapper.optimize_budget relays every
keyword to BudgetOptimizer.allocate_budget, not only the scipy
minimize options, so the previous name was misleading (callers could
end up passing minimize_kwargs={...} inside **minimize_kwargs).
Closes pymc-labs#1660
e39d5d1 to
734acea
Compare
juanitorduz
approved these changes
May 13, 2026
Collaborator
juanitorduz
left a comment
There was a problem hiding this comment.
Thanks!
WDYT @cetagostini ?
williambdean
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1660.
BudgetOptimizerWrapper.optimize_budget's variadic relays every keyword toBudgetOptimizer.allocate_budget(x0,minimize_kwargs,return_if_fail, ...), not only the scipy minimize options, so the previous name was misleading. Renaming to**allocate_budget_kwargsmatches what the parameter actually does and avoids the awkwardminimize_kwargs={"minimize_kwargs": {...}}reading.User-facing calls are unaffected: callers pass
minimize_kwargs=,x0=,return_if_fail=as named kwargs that the variadic absorbs and re-forwards by name.📚 Documentation preview 📚: https://pymc-marketing--2563.org.readthedocs.build/en/2563/