-
Notifications
You must be signed in to change notification settings - Fork 78
Description
The removal of the LambdaTransform leaves a hole that needs to be filled, as arbitrary custom transforms are something that we require in our projects. Implementing custom transforms via subclassing is possible, but requires a lot more boilerplate, and is harder to get right. If one wants to combine it with the FilterTransform as was possible with .apply, the complexity increases even more.
I personally think what LambdaTransform and .apply offered was a very convenient wrapper, that let's users focus on the main part: Writing the forward and inverse transform. in the constructor of LambdaTransform, we could check if the provided functions are already registered and therefore serializable. If they are not, we can warn/error with instructions of how to achieve that (which is: put a decorator before the function). This could be accompanied by a more detailed tutorial-style notebook, that can also be linked in the warning. In my opinion, this should be sufficient to get the power users that want to use such transforms on the right track, and be able to alleviate the concerns regarding serialization.
Please let me know what you think.
@LarsKue @stefanradev93 @paul-buerkner @elseml