Skip to content

Commit

Permalink
Merge pull request #1051 from bpopeters/spurious-imports
Browse files Browse the repository at this point in the history
Remove unnecessary future division imports
  • Loading branch information
vince62s committed Nov 20, 2018
2 parents 57da695 + 9df20ab commit 38df866
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 18 deletions.
1 change: 0 additions & 1 deletion onmt/decoders/decoder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
""" Base Class and function for Decoders """

from __future__ import division
import torch
import torch.nn as nn

Expand Down
2 changes: 0 additions & 2 deletions onmt/encoders/encoder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Base class for encoders and generic multi encoders."""

from __future__ import division

import torch.nn as nn

from onmt.utils.misc import aeq
Expand Down
2 changes: 0 additions & 2 deletions onmt/encoders/mean_encoder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""Define a minimal encoder."""
from __future__ import division

from onmt.encoders.encoder import EncoderBase


Expand Down
2 changes: 0 additions & 2 deletions onmt/encoders/rnn_encoder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""Define RNN-based encoders."""
from __future__ import division

import torch.nn as nn
import torch.nn.functional as F

Expand Down
2 changes: 0 additions & 2 deletions onmt/train_single.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"""
Training on a single process
"""
from __future__ import division

import argparse
import os
import random
Expand Down
2 changes: 0 additions & 2 deletions onmt/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
users of this library) for the strategy things we do.
"""

from __future__ import division

import onmt.inputters as inputters
import onmt.utils

Expand Down
3 changes: 1 addition & 2 deletions onmt/translate/translation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
""" Translation main class """
from __future__ import division, unicode_literals
from __future__ import print_function
from __future__ import unicode_literals, print_function

import torch
import onmt.inputters as inputters
Expand Down
2 changes: 0 additions & 2 deletions onmt/utils/rnn_factory.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""
RNN tools
"""
from __future__ import division

import torch.nn as nn
import onmt.models

Expand Down
1 change: 0 additions & 1 deletion tools/extract_embeddings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import division
import torch
import argparse
import onmt
Expand Down
1 change: 0 additions & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"""
Main training workflow
"""
from __future__ import division
import argparse
import os
import signal
Expand Down
2 changes: 1 addition & 1 deletion translate.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import division, unicode_literals
from __future__ import unicode_literals
import argparse

from onmt.utils.logging import init_logger
Expand Down

0 comments on commit 38df866

Please sign in to comment.