You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature you'd like
As a user, I want to be able to compose acquisition function builders with minimal effort and minimal code.
Is your feature request related to a problem? Please describe.
At the moment, one needs to define a new class to create a custom reducer, but since it only needs one function implementing, users should be able to specify just the new function
The text was updated successfully, but these errors were encountered:
make Reducer a function (tf.Tensor -> tf.Tensor) -> Sequence[AcquisitionFunctionBuilder] -> AcquisitionFunctionBuilder
add a classmethod from_fn: (tf.Tensor -> tf.Tensor) -> Reducer, though this would only make sense if we can do it in such a way that subclasses don't have access to the method ... i.e. make it a module-level function. However, this is the same as 1.
Don't think this is worthwhile, mainly because a functional constructor makes it more difficult (maybe impossible?) to specify generic typing. E.g. Sum = Reducer(tf.add_n) can't specify the fact that Sum is generic in the type of supported models (i.e. if all the builders support some ProbabilisticModelType then so does Sum). Furthermore, we've seen very little use of reducers since this ticket was raised, and being forced to define a named subclass is arguably more Pythonic anyway.
Describe the feature you'd like
As a user, I want to be able to compose acquisition function builders with minimal effort and minimal code.
Is your feature request related to a problem? Please describe.
At the moment, one needs to define a new class to create a custom reducer, but since it only needs one function implementing, users should be able to specify just the new function
The text was updated successfully, but these errors were encountered: