Showing 95 of 134 total issues
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function load_state_dict
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def load_state_dict(self, state_dict: dict, keys: list | tuple | None = None) -> None:
r"""Loads the state dict of each module.
Note this method ignore the missing modules or keys. For
example if you want to load the optimizer module but there is
- 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 __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function kaiming_normal
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def kaiming_normal(
Function kaiming_uniform
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def kaiming_uniform(
Function create_dummy_engine
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_dummy_engine(
Function barron_robust_loss
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def barron_robust_loss(
Function exponential_nll_loss
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def exponential_nll_loss(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function create_logspace_scale
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_logspace_scale(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function create_linear_warmup_linear_decay_lr
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_linear_warmup_linear_decay_lr(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function create_logspace_value_range
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_logspace_value_range(
Function is_loss_decreasing_with_adam
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def is_loss_decreasing_with_adam(