Skip to content

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")

Calls to MIPROv2(...) that pass a string literal other than "light", "medium", or "heavy" to auto=.

Pass "light", "medium", "heavy", or None (with explicit num_candidates and num_trials in compile()).

MIPROv2(auto=...) only accepts None, 'light', 'medium', or 'heavy' and raises ValueError for any other string.

See all rules in the DSPy pack.