Unbabel/OpenKiwi

View on GitHub
kiwi/systems/tlm_system.py

Summary

Maintainability
B
6 hrs
Test Coverage
B
86%

File tlm_system.py has 355 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/tlm_system.py - About 4 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                            if selection not in metrics:
                                raise KeyError(
                                    f'Main metric {selection} is not a configured metric; '
                                    f'available options are: {metrics.keys()}'
                                )
    Severity: Major
    Found in kiwi/systems/tlm_system.py - About 45 mins to fix

      Function load_from_checkpoint has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def load_from_checkpoint(
      Severity: Minor
      Found in kiwi/systems/tlm_system.py - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status