durandtibo/gravitorch

View on GitHub

Showing 95 of 134 total issues

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

    def __init__(
Severity: Minor
Found in src/gravitorch/models/networks/mlp.py - About 45 mins to fix

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

        def __init__(
    Severity: Minor
    Found in src/gravitorch/models/criteria/padded_seq.py - About 45 mins to fix

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

          def __init__(
      Severity: Minor
      Found in src/gravitorch/nn/fourier_feature.py - About 45 mins to fix

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

            def __init__(
        Severity: Minor
        Found in src/gravitorch/loops/evaluation/vanilla.py - About 45 mins to fix

          Function load_state_dict has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          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
          Severity: Minor
          Found in src/gravitorch/utils/asset.py - About 45 mins to fix

          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

              def __init__(
          Severity: Minor
          Found in src/gravitorch/utils/meters/scalar.py - About 45 mins to fix

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

            def kaiming_normal(
            Severity: Minor
            Found in src/gravitorch/nn/init/kaiming.py - About 45 mins to fix

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

              def kaiming_uniform(
              Severity: Minor
              Found in src/gravitorch/nn/init/kaiming.py - About 45 mins to fix

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

                def create_dummy_engine(
                Severity: Minor
                Found in src/gravitorch/testing/dummy.py - About 45 mins to fix

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

                  def barron_robust_loss(
                  Severity: Minor
                  Found in src/gravitorch/nn/functional/barron_loss.py - About 45 mins to fix

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

                    def exponential_nll_loss(
                    Severity: Minor
                    Found in src/gravitorch/nn/functional/experimental/exponential_nll.py - About 45 mins to fix

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

                          def __init__(
                      Severity: Minor
                      Found in src/gravitorch/models/networks/mlp.py - About 45 mins to fix

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

                            def __init__(
                        Severity: Minor
                        Found in src/gravitorch/utils/history/comparable.py - About 45 mins to fix

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

                              def create_logspace_scale(
                          Severity: Minor
                          Found in src/gravitorch/nn/scalar_encoding.py - About 35 mins to fix

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

                                def __init__(
                            Severity: Minor
                            Found in src/gravitorch/experimental/dataloader/distributed.py - About 35 mins to fix

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

                                  def __init__(
                              Severity: Minor
                              Found in src/gravitorch/datasets/dummy.py - About 35 mins to fix

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

                                def create_linear_warmup_linear_decay_lr(
                                Severity: Minor
                                Found in src/gravitorch/lr_schedulers/creation.py - About 35 mins to fix

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

                                      def __init__(
                                  Severity: Minor
                                  Found in src/gravitorch/handlers/engine_loader.py - About 35 mins to fix

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

                                        def create_logspace_value_range(
                                    Severity: Minor
                                    Found in src/gravitorch/nn/scalar_encoding.py - About 35 mins to fix

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

                                      def is_loss_decreasing_with_adam(
                                      Severity: Minor
                                      Found in src/gravitorch/models/utils/testing.py - About 35 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language