reduce_first() makes a reducer for ensemble() that returns the output
of the first module that succeeded, in the order of modules. Use it for
fallbacks: a module fails, and the next one answers.
Value
A function function(outputs, weights = NULL) for the reduce_fn
argument of ensemble().
Details
ensemble() still runs every module, so this does not save calls.
See also
Other composition:
as_reward_fn(),
best_of_n(),
ensemble(),
module-graph,
pipeline(),
reduce_best_by_metric(),
reduce_majority(),
reduce_weighted_vote(),
refine(),
step(),
with_assertions()