Description
Some of the tutorials in the documentation make use of Classes which were deprecated in version 0.7.0. For example, the code in Transformer Tutorial makes use of torchtext.data.Field and torchtext.data.Example and thus produces the following warnings:
/usr/local/lib/python3.6/dist-packages/torchtext/data/field.py:150: UserWarning: Field class will be retired in the 0.8.0 release and moved to torchtext.legacy. Please see 0.7.0 release notes for further information.
warnings.warn('{} class will be retired in the 0.8.0 release and moved to torchtext.legacy. Please see 0.7.0 release notes for further information.'.format(self.__class__.__name__), UserWarning)
/usr/local/lib/python3.6/dist-packages/torchtext/data/example.py:78: UserWarning: Example class will be retired in the 0.8.0 release and moved to torchtext.legacy. Please see 0.7.0 release notes for further information.
warnings.warn('Example class will be retired in the 0.8.0 release and moved to torchtext.legacy. Please see 0.7.0 release notes for further information.', UserWarning)
Since tutorials are the primary source of info for new comers, they should make use of the best available APIs and avoid deprecated methods.
I agree it's not at all clear what the path to release 0.8.0 is - the samples don't cover all the features of torchtext.data.Field and they reply on private helpers so there's a need for a clearer roadmap in my opinion.
@zhangguanheng66 can you update the tutorials with the new recommended abstractions?
Also this tutorial states "This is a tutorial on how to train a sequence-to-sequence model that uses the nn.Transformer module. But whilst it uses most of the layers from the transformer module, it actually doesn't use nn.Transformer.
I will make an update for the transformer tutorial ASAP. For the legacy code, we will fully retire in 0.8.0 release. By then, we will have a tutorial to show how to use the new building blocks for the end-to-end pipeline application.
I will make an update for the transformer tutorial ASAP. For the legacy code, we will fully retire in 0.8.0 release. By then, we will have a tutorial to show how to use the new building blocks for the end-to-end pipeline application.
With 0.8.0 release, I still cannot find a proper example which can serve as a guide to using collate_fn or any other alternate to Field. It would be really helpful, if anyone can link any updated example for a custom dataset.
I will make an update for the transformer tutorial ASAP. For the legacy code, we will fully retire in 0.8.0 release. By then, we will have a tutorial to show how to use the new building blocks for the end-to-end pipeline application.
With 0.8.0 release, I still cannot find a proper example which can serve as a guide to using collate_fn or any other alternate to Field. It would be really helpful, if anyone can link any updated example for a custom dataset.
We are still finalizing the APIs and updating the relevant tutorials. Those two examples uses collate_fn and DataLoader
Also link the execution plan https://github.com/pytorch/text/issues/985
How can someone get the functionality that TabularDataset with its tokenizing and it preprocessing pipelines provided without using the legacy code?
You can take a look at the text classification example.
Most helpful comment
With 0.8.0 release, I still cannot find a proper example which can serve as a guide to using collate_fn or any other alternate to Field. It would be really helpful, if anyone can link any updated example for a custom dataset.