dspy/mipro-v2-invalid-auto
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| DSPy | error | none, edit by hand | All versions |
dspy.MIPROv2(auto=...) validates auto against {None, "light", "medium", "heavy"} and raises ValueError for any other string.
optimizer = dspy.MIPROv2(metric=score, auto="fast")optimizer = dspy.MIPROv2(metric=score, auto="light")What the rule reports
Section titled “What the rule reports”Calls to MIPROv2(...) that pass a string literal other than "light", "medium", or "heavy" to auto=.
How to fix it
Section titled “How to fix it”Pass "light", "medium", "heavy", or None (with explicit num_candidates and num_trials in compile()).
Diagnostic message
Section titled “Diagnostic message”MIPROv2(auto=...) only accepts None, 'light', 'medium', or 'heavy' and raises ValueError for any other string.See all rules in the DSPy pack.