kjappelbaum/pyepal

View on GitHub

Showing 47 of 103 total issues

Function plot_learning_curve has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

def plot_learning_curve(  # pylint:disable=dangerous-default-value, too-many-arguments, too-many-locals
Severity: Major
Found in src/pyepal/plotting/__init__.py - About 1 hr to fix

    Function _pareto_classify has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def _pareto_classify(  # pylint:disable=too-many-arguments, too-many-locals, too-many-branches
    Severity: Major
    Found in src/pyepal/pal/core.py - About 1 hr to fix

      Function build_dense_network has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      def build_dense_network(
          hidden_layers: Sequence[int],
          activations: Union[Sequence, str] = "erf",
          w_std: float = 2.5,
          b_std=1,
      Severity: Minor
      Found in src/pyepal/models/nt.py - About 55 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 validate_positive_integer_list has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      def validate_positive_integer_list(
          seq: Any, ndim: int, parameter_name: str = "Parameter"
      ) -> Sequence[int]:
          """Can be used, e.g., to validate and standardize the ensemble size
          and epochs input"""
      Severity: Minor
      Found in src/pyepal/pal/validate_inputs.py - About 55 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 _set_one_infinite_width_model has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def _set_one_infinite_width_model(  # pylint:disable=too-many-arguments
      Severity: Major
      Found in src/pyepal/pal/pal_neural_tangent.py - About 50 mins to fix

        Function get_maxmin_samples has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def get_maxmin_samples(  # pylint:disable=invalid-name
        Severity: Major
        Found in src/pyepal/pal/utils.py - About 50 mins to fix

          Function run_one_step has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def run_one_step(  # pylint:disable=too-many-arguments
          Severity: Major
          Found in src/pyepal/pal/pal_base.py - About 50 mins to fix

            Function _get_max_wt_all has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def _get_max_wt_all(  # pylint:disable=too-many-arguments
            Severity: Major
            Found in src/pyepal/pal/core.py - About 50 mins to fix

              Function plot_pareto_front_2d has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def plot_pareto_front_2d(  # pylint:disable=too-many-arguments, invalid-name
              Severity: Major
              Found in src/pyepal/plotting/__init__.py - About 50 mins to fix

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

                def _train_model_picklable(i, models, design_space, objectives, sampled):
                Severity: Minor
                Found in src/pyepal/pal/pal_gbdt.py - About 35 mins to fix

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

                  def build_model(
                  Severity: Minor
                  Found in src/pyepal/models/gpr.py - About 35 mins to fix

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

                    def build_coregionalized_model(
                    Severity: Minor
                    Found in src/pyepal/models/gpr.py - About 35 mins to fix

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

                      def _train_model_picklable(i, models, design_space, objectives, sampled):
                      Severity: Minor
                      Found in src/pyepal/pal/pal_sklearn.py - About 35 mins to fix

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

                        def plot_bar_iterations(  # pylint:disable=invalid-name
                        Severity: Minor
                        Found in src/pyepal/plotting/__init__.py - About 35 mins to fix

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

                          def plot_jointplot(  # pylint:disable=invalid-name
                          Severity: Minor
                          Found in src/pyepal/plotting/__init__.py - About 35 mins to fix

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

                            def plot_residuals(  # pylint:disable=invalid-name
                            Severity: Minor
                            Found in src/pyepal/plotting/__init__.py - About 35 mins to fix

                              Function run_one_step has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def run_one_step(  # pylint:disable=too-many-arguments
                                      self,
                                      batch_size: int = 1,
                                      pooling_method: str = "fro",
                                      sample_discarded: bool = False,
                              Severity: Minor
                              Found in src/pyepal/pal/pal_base.py - About 35 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 set_XY has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def set_XY(self, X=None, Y=None):
                                      if isinstance(X, list):
                                          X, _, self.output_index = util.multioutput.build_XY(X, None)
                                      if isinstance(Y, list):
                                          _, Y, self.output_index = util.multioutput.build_XY(Y, Y)
                              Severity: Minor
                              Found in src/pyepal/models/coregionalized.py - About 35 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 sample has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def sample(
                                      self,
                                      exclude_idx: Union[np.array, None] = None,
                                      pooling_method: str = "fro",
                                      sample_discarded: bool = False,
                              Severity: Minor
                              Found in src/pyepal/pal/pal_base.py - About 25 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 augment_design_space has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def augment_design_space(  # pylint: disable=invalid-name
                                      self, X_design: np.ndarray, classify: bool = False, clean_classify: bool = True
                                  ) -> None:
                                      """Add new design points to PAL instance
                              
                              
                              Severity: Minor
                              Found in src/pyepal/pal/pal_base.py - About 25 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

                              Severity
                              Category
                              Status
                              Source
                              Language