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
make_train_dataloader discards custom collate function passed as kwarg #1531
Comments
This was supposedly fixed in #1089, or at least this is mentioned there:
But, my experience above doesn't align with it. Either way, #1089 seems relevant to the conversation. |
This is definitely a bug. Can you submit a PR that properly adds |
Should this fix be done through updating I will also write a test to check whether kwarg collate takes precedence over dataset collate. Feel free to assign to me, thanks |
I think updating |
Was this fixed in the meantime? |
Describe the bug
Calling
should respect all of the keyword arguments I pass in. In this case,
my_custom_collate
is discarded.To Reproduce
For debugging, I define a custom strategy to examine what is passed into the dataloader. The make_train_dataloader function is lifted as it is from the 0.4.0 implementation
(Please note that I set breakpoints with
pdb
)Expected behavior
other_dataloader_args
should obey the kwargs and passmy_custom_collate
alongScreenshots
In the screenshot above
p kwargs
shows the custom collate function, but that does not show up inother_dataloader_args
which is what is passed ontoTaskBalancedDataLoader
Additional context
I cannot immediately think of why something like
other_dataloader_args.update(kwargs)
is a poor idea, would love to hear thoughts.The text was updated successfully, but these errors were encountered: