Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose cannot handle transforms that change data and label #279

Open
bauerfe opened this issue Feb 16, 2024 · 1 comment
Open

Compose cannot handle transforms that change data and label #279

bauerfe opened this issue Feb 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bauerfe
Copy link
Collaborator

bauerfe commented Feb 16, 2024

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 bauerfe added the bug Something isn't working label Feb 16, 2024
@biphasic
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants