Official tutorials use deprecated Classes
See original GitHub issue📚 Documentation
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.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Deprecated Classes in Spring - Baeldung
In this tutorial, we're going to take a look at the deprecated classes in Spring and Spring Boot and explain what these have...
Read more >Is it wrong to use Deprecated methods or classes in Java?
The question of whether it's right or wrong to use deprecated methods will have to be examined on individual basis.
Read more >The @Deprecated Annotation in Java - GeeksforGeeks
The @Deprecated annotation tells the compiler that a method, class, or field is deprecated and that it should generate a warning if someone ......
Read more >How and When to Deprecate APIs - Oracle Help Center
Starting with J2SE 5.0, you deprecate a class, method, or field by using the @Deprecated annotation. Additionally, you can use the @deprecated Javadoc...
Read more >Tutorial — Deprecated 1.2.14 documentation - Read the Docs
Deprecated class ¶ ; __new__ will be called when instance is being created. Using this method you can customize the instance creation. the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.