kiwi/systems/tlm_system.py
File tlm_system.py
has 355 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
Avoid deeply nested control flow statements. Open
Open
if selection not in metrics:
raise KeyError(
f'Main metric {selection} is not a configured metric; '
f'available options are: {metrics.keys()}'
)
Function load_from_checkpoint
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def load_from_checkpoint(