question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
pratikkejriwalcommented, Nov 9, 2020

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.

2reactions
zhangguanheng66commented, Sep 7, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found