Commit 3278e854 authored by Myle Ott's avatar Myle Ott
Browse files

Fix flake8 lint

parent 56c28099
......@@ -113,11 +113,9 @@ class LanguageDatasets(object):
batch_sampler=batch_sampler)
def eval_dataloader(self, split, num_workers=0, batch_size=1,
max_tokens=None, consider_dst_sizes=True,
max_positions=(1024, 1024),
max_tokens=None, max_positions=(1024, 1024),
skip_invalid_size_inputs_valid_test=False):
dataset = self.splits[split]
dst_dataset = dataset.dst if consider_dst_sizes else None
batch_sampler = list(batches_by_size(
dataset.src, dataset.dst, batch_size, max_tokens,
max_positions=max_positions,
......
......@@ -6,8 +6,6 @@
# can be found in the PATENTS file in the same directory.
#
import torch.nn as nn
from . import FairseqDecoder
......
......@@ -10,7 +10,7 @@ import sys
import torch
from torch.autograd import Variable
from fairseq import data, options, tokenizer, utils
from fairseq import options, tokenizer, utils
from fairseq.sequence_generator import SequenceGenerator
......@@ -73,5 +73,6 @@ def main():
print('A\t{}'.format(' '.join(map(str, alignment))))
print('H\t{}\t{}'.format(hypo['score'], hypo_str))
if __name__ == '__main__':
main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment