IEBP004: task_overridable_defaults¶
@task parameters naming a solver, scorer, metric, grader or model have defaults.
Category: best_practices ยท Applies to: eval, helper
What it does¶
Flags each parameter of a @task function whose name contains solver, scorer, metric, metrics, grader or model and has no default.
Why is this bad?¶
These are the pieces callers most often want to swap. With defaults the task runs unconfigured, inspect eval my_eval/task just works, and each piece can still be overridden with -T.
Example¶
@task
def my_eval(solver, grader_model):
...
Use instead:
@task
def my_eval(solver: Solver | None = None, grader_model: str | None = None):
...
Suppress on a line with # inspect-evals-lint: ignore[IEBP004] or ignore[task_overridable_defaults]; select or ignore it in configuration by either, or by the prefix IEBP.