Skip to content

Commit

Permalink
[BE] Delete from __future__ import (#2429)
Browse files Browse the repository at this point in the history
As Python-2.7 is long past EOL, and all tutorials are living in the future :)
  • Loading branch information
malfet authored Jun 6, 2023
1 parent 121f71a commit 1068abe
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 28 deletions.
3 changes: 0 additions & 3 deletions advanced_source/cpp_frontend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1216,9 +1216,6 @@ tensors and display them with matplotlib:
.. code-block:: python
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import matplotlib.pyplot as plt
Expand Down
2 changes: 0 additions & 2 deletions advanced_source/neural_style_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
# - ``torchvision.models`` (train or load pretrained models)
# - ``copy`` (to deep copy the models; system package)

from __future__ import print_function

import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
5 changes: 0 additions & 5 deletions beginner_source/chatbot_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@
# After that, let’s import some necessities.
#

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import torch
from torch.jit import script, trace
import torch.nn as nn
Expand Down
1 change: 0 additions & 1 deletion beginner_source/data_loading_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"""

from __future__ import print_function, division
import os
import torch
import pandas as pd
Expand Down
5 changes: 0 additions & 5 deletions beginner_source/deploy_seq2seq_hybrid_frontend_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@
# maximum length output that the model is capable of producing.
#

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
1 change: 0 additions & 1 deletion beginner_source/fgsm_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
# into the implementation.
#

from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
2 changes: 0 additions & 2 deletions beginner_source/transfer_learning_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
# License: BSD
# Author: Sasank Chilamkurthy

from __future__ import print_function, division

import torch
import torch.nn as nn
import torch.optim as optim
Expand Down
1 change: 0 additions & 1 deletion intermediate_source/char_rnn_classification_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
``{language: [names ...]}``. The generic variables "category" and "line"
(for language and name in our case) are used for later extensibility.
"""
from __future__ import unicode_literals, print_function, division
from io import open
import glob
import os
Expand Down
1 change: 0 additions & 1 deletion intermediate_source/char_rnn_generation_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
and end up with a dictionary ``{language: [names ...]}``.
"""
from __future__ import unicode_literals, print_function, division
from io import open
import glob
import os
Expand Down
2 changes: 0 additions & 2 deletions intermediate_source/dynamic_quantization_bert_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ In this step we import the necessary Python modules for the tutorial.

.. code:: python
from __future__ import absolute_import, division, print_function
import logging
import numpy as np
import os
Expand Down
1 change: 0 additions & 1 deletion intermediate_source/seq2seq_translation_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
**Requirements**
"""
from __future__ import unicode_literals, print_function, division
from io import open
import unicodedata
import string
Expand Down
1 change: 0 additions & 1 deletion intermediate_source/spatial_transformer_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
# License: BSD
# Author: Ghassen Hamrouni

from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
2 changes: 0 additions & 2 deletions prototype_source/graph_mode_dynamic_bert_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ Once all the necesessary packages are downloaded and installed we setup the code

.. code:: python
from __future__ import absolute_import, division, print_function
import logging
import numpy as np
import os
Expand Down
1 change: 0 additions & 1 deletion prototype_source/numeric_suite_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

##############################################################################

from __future__ import print_function, division, absolute_import
import numpy as np
import torch
import torch.nn as nn
Expand Down

0 comments on commit 1068abe

Please sign in to comment.