Unbabel/OpenKiwi

View on GitHub
kiwi/systems/encoders/xlm.py

Summary

Maintainability
C
1 day
Test Coverage
C
72%

File xlm.py has 388 lines of code (exceeds 250 allowed). Consider refactoring.
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
Severity: Minor
Found in kiwi/systems/encoders/xlm.py - About 5 hrs to fix

    Function fit_vocab has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def fit_vocab(
    Severity: Major
    Found in kiwi/systems/encoders/xlm.py - About 50 mins to fix

      Function split_outputs has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def split_outputs(
      Severity: Minor
      Found in kiwi/systems/encoders/xlm.py - About 35 mins to fix

        Function concat_input has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def concat_input(batch_a, batch_b, pad_id, lang_a=None, lang_b=None):
        Severity: Minor
        Found in kiwi/systems/encoders/xlm.py - About 35 mins to fix

          Function interleave_input has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def interleave_input(batch_a, batch_b, pad_id, lang_a=None, lang_b=None):
          Severity: Minor
          Found in kiwi/systems/encoders/xlm.py - About 35 mins to fix

            Function forward has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def forward(
            Severity: Minor
            Found in kiwi/systems/encoders/xlm.py - About 35 mins to fix

              There are no issues that match your filters.

              Category
              Status