-
Notifications
You must be signed in to change notification settings - Fork 131
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
Automatically sorting dataset does not work with Torch engine forward + MetaDatasets #1683
Comments
I believe that |
That depends on how you define what But that's not really the point here. The situation is, we can easily support this. The question is, should we somehow make setting |
I'm a bit hesitant, because the purpose of setting |
What data key is used for the seq length for the sorting (and/or heuristic for approx seq length) is anyway up to the dataset. But usually e.g. the input sequence lengths are very correlated to the output sequence lengths, so this was not so much an issue. In case of MetaDataset, in all cases that we have had so far, just leaving sorting to the control dataset (as we anyway do now) is totally fine. |
We currently do this in Torch
Engine.forward_with_callback
:MetaDataset.supports_seq_order_sorting
is this:Here a
seq_order_control_dataset
was used, tosupports_seq_order_sorting
returns True.However, then
MetaDataset
will completely ignore theseq_ordering
. It will just leave the sorting, and any options completely up toseq_order_control_dataset
.Many other meta datasets, e.g.
MultiProcDataset
,PostprocessingDataset
, are behaving just in the same way.I'm not really sure what code to blame, or how to fix this. Maybe setting
is just wrong? We also cannot easily change that without suddenly changing many existing setups in maybe unexpected ways.
Even fixing this now, i.e. specifically that a meta dataset is now sorted in forward, even by itself is already a change which might require a new behavior version, or option? It definitely will influence the results with most of our existing models (due to batching and padding).
(cc @NeoLegends @dorian-K)
The text was updated successfully, but these errors were encountered: