tonic icon indicating copy to clipboard operation
tonic copied to clipboard

Compose cannot handle transforms that change data and label

Open bauerfe opened this issue 4 months ago • 1 comments

Dataset classes in tonic have a transforms parameter, which allows passing callables that are applied to both data and labels, as opposed to transform which is only applied to the data.

It seems that composition with the Compose class is currently only possible for transform-type functions that only change the data. This could be fixed easily by changing the events parameter in the call method to *events and adapting the function code accordingly.

bauerfe avatar Feb 16 '24 15:02 bauerfe

That's a good point, thanks for flagging that! For a quick workaround I just used custom wrapper functions in the past

biphasic avatar Feb 16 '24 16:02 biphasic