File eval_zs_rsg.py
has 698 lines of code (exceeds 250 allowed). Consider refactoring. Open
from typing import Tuple, Callable
import re
import copy
from pathlib import Path
from tqdm import tqdm
Function main
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def main(
model_name,
nrows: int = None,
template_path: str = "internal_prompts/saiga_v2.json",
split: str = "test",
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function predict_muserc
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def predict_muserc(
split,
predict_func,
output_path,
batch_size: int = 2,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function predict_rucos
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def predict_rucos(
split,
predict_func,
output_path,
batch_size: int = 4,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function predict_rucos
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def predict_rucos(
Function predict_parus
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def predict_parus(
split,
predict_func,
output_path,
batch_size: int = 12,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function predict_rwsd
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def predict_rwsd(
Function predict_terra
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def predict_terra(
Function predict_saiga_zero_shot
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def predict_saiga_zero_shot(
Function main
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def main(
Function predict_russe
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def predict_russe(
Function predict_muserc
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def predict_muserc(
Function predict_parus
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def predict_parus(
Function predict_danetqa
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def predict_danetqa(
Function predict_rcb
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def predict_rcb(
Function predict_danetqa
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def predict_danetqa(
split,
predict_func,
output_path,
batch_size: int = 4,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function predict_lidirus
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def predict_lidirus(
Function generate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate(
Function predict_rwsd
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def predict_rwsd(
split,
predict_func,
output_path,
batch_size: int = 4,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function find_lcs
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def find_lcs(s1, s2):
max_lcs = ""
for i in range(len(s1)):
for j in range(i + 1, len(s1)):
ss1 = s1[i:j]
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function predict_terra
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def predict_terra(
split,
predict_func,
output_path,
batch_size: int = 8,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"