WenjieDu/PyPOTS

View on GitHub

Showing 455 of 455 total issues

Function forward has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def forward(
        self,
        q: torch.Tensor,
        k: torch.Tensor,
        v: torch.Tensor,
Severity: Minor
Found in pypots/nn/modules/fedformer/layers.py - About 1 hr to fix

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

        def __init__(
    Severity: Major
    Found in pypots/nn/modules/csdi/backbone.py - About 1 hr to fix

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

          def __init__(
      Severity: Major
      Found in pypots/classification/raindrop/core.py - About 1 hr to fix

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

            def __init__(
        Severity: Major
        Found in pypots/imputation/etsformer/core.py - About 1 hr to fix

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

              def __init__(
          Severity: Major
          Found in pypots/nn/modules/raindrop/layers.py - About 1 hr to fix

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

                def __init__(
            Severity: Major
            Found in pypots/imputation/itransformer/core.py - About 1 hr to fix

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

                  def __init__(
              Severity: Major
              Found in pypots/imputation/nonstationary_transformer/core.py - About 1 hr to fix

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

                    def __init__(
                Severity: Major
                Found in pypots/imputation/csdi/core.py - About 1 hr to fix

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

                      def __init__(
                  Severity: Major
                  Found in pypots/imputation/informer/core.py - About 1 hr to fix

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

                        def __init__(
                    Severity: Major
                    Found in pypots/imputation/pyraformer/core.py - About 1 hr to fix

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

                          def __init__(
                      Severity: Major
                      Found in pypots/imputation/transformer/core.py - About 1 hr to fix

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

                            def __init__(
                        Severity: Major
                        Found in pypots/imputation/brits/model.py - About 1 hr to fix

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

                              def __init__(
                          Severity: Major
                          Found in pypots/imputation/mrnn/model.py - About 1 hr to fix

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

                                def __init__(
                            Severity: Major
                            Found in pypots/imputation/crossformer/core.py - About 1 hr to fix

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

                                  def __init__(
                              Severity: Major
                              Found in pypots/imputation/grud/model.py - About 1 hr to fix

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

                                    def __init__(
                                Severity: Major
                                Found in pypots/imputation/reformer/core.py - About 1 hr to fix

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

                                      def __init__(
                                  Severity: Major
                                  Found in pypots/imputation/autoformer/core.py - About 1 hr to fix

                                    Function forward has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        def forward(
                                            self,
                                            q: torch.Tensor,
                                            k: torch.Tensor,
                                            v: torch.Tensor,
                                    Severity: Minor
                                    Found in pypots/nn/modules/fedformer/layers.py - About 1 hr 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_scheduler has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        def init_scheduler(self, optimizer):
                                            """Initialize the scheduler. This method should be called in
                                            :class:`pypots.optim.base.Optimizer.init_optimizer()` to initialize the scheduler together with the optimizer.
                                    
                                            Parameters
                                    Severity: Minor
                                    Found in pypots/optim/lr_scheduler/base.py - About 1 hr 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 sample_factor_x has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    def sample_factor_x(tau_sparse_tensor, tau_ind, time_lags, U, V, X, A, Lambda_x):
                                        """Sampling T-by-R factor matrix X."""
                                    
                                        dim3, rank = X.shape
                                        tmax = np.max(time_lags)
                                    Severity: Minor
                                    Found in pypots/forecasting/bttf/submodules.py - About 1 hr 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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language