We already have examples/recipes, but it could be even easier for people if there were built-in utilities:
@memo
def f(alpha, beta): ...
f.grid_search(
loss=lambda pred: …,
grid=(np.linspace(…), np.linspace(…), …)
)
f.gradient_fit(
loss=lambda pred: …,
init=(0, 0.5),
step_size=…,
num_iterations=…
)