mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-12 11:50:11 +08:00
added a __call__ method to BatchTransform to make it useable as a decorator.
This commit is contained in:
@@ -454,6 +454,9 @@ class BatchTransform(EventWindow):
|
||||
|
||||
return self.cached
|
||||
|
||||
def __call__(self, f):
|
||||
self.compute_transform_value = f
|
||||
return self.handle_data
|
||||
|
||||
def batch_transform(func):
|
||||
"""Decorator function to use instead of inheriting from BatchTransform.
|
||||
|
||||
Reference in New Issue
Block a user