kiwi/systems/encoders/xlm.py
File xlm.py
has 388 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# OpenKiwi: Open-Source Machine Translation Quality Estimation
# Copyright (C) 2020 Unbabel <openkiwi@unbabel.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
Function fit_vocab
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def fit_vocab(
Function split_outputs
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def split_outputs(
Function concat_input
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def concat_input(batch_a, batch_b, pad_id, lang_a=None, lang_b=None):
Function interleave_input
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def interleave_input(batch_a, batch_b, pad_id, lang_a=None, lang_b=None):
Function forward
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def forward(