Showing 2,238 of 2,238 total issues

Function plot_precision_recall_n has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def plot_precision_recall_n(self,
                                figsize=(16, 12),
                                fontsize=20):
        """
        Plot recall and precision curves against depth into the list.
Severity: Minor
Found in src/triage/component/postmodeling/contrast/model_evaluator.py - About 1 hr to fix

    Function test_reuse_model_random_seeds has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def test_reuse_model_random_seeds(grid_config, default_model_trainer):
        trainer = default_model_trainer
        db_engine = trainer.db_engine
        project_storage = trainer.model_storage_engine.project_storage
        model_storage_engine = trainer.model_storage_engine
    Severity: Minor
    Found in src/tests/catwalk_tests/test_model_trainers.py - About 1 hr to fix

      Function create_sample_distance_table has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def create_sample_distance_table(engine):
          ensure_db(engine)
          init_engine(engine)
          model_groups = {
              "stable": ModelGroupFactory(model_type="myStableClassifier"),
      Severity: Minor
      Found in src/tests/audition_tests/utils.py - About 1 hr to fix

        Function _write_model_to_db has 9 arguments (exceeds 5 allowed). Consider refactoring.
        Open

            def _write_model_to_db(
        Severity: Major
        Found in src/triage/component/catwalk/model_trainers.py - About 1 hr to fix

          Function feature_loi_loo has 9 arguments (exceeds 5 allowed). Consider refactoring.
          Open

              def feature_loi_loo(self,
          Severity: Major
          Found in src/triage/component/postmodeling/contrast/model_group_evaluator.py - About 1 hr to fix

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

                def __init__(
            Severity: Major
            Found in src/triage/component/audition/__init__.py - About 1 hr to fix

              Function _plot_lines has 9 arguments (exceeds 5 allowed). Consider refactoring.
              Open

              def _plot_lines(frame, x_col, y_col, ax, grp_col, colordict, cat_col, styledict, alpha):
              Severity: Major
              Found in src/triage/component/audition/plotting.py - About 1 hr to fix

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

                    def plot_preds_comparison(self,
                                              param_type=None,
                                              param=None,
                                              model_subset=None,
                                              figsize=(28, 16),
                Severity: Minor
                Found in src/triage/component/postmodeling/contrast/model_group_evaluator.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 all_combinations has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                def all_combinations(feature_groups):
                    """Return all combinations of groups, excluding repeated groups
                
                    Args:
                        feature_groups (list) The feature groups to apply the strategy to
                Severity: Minor
                Found in src/triage/component/architect/feature_group_mixer.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 plot_prec_across_time has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    def plot_prec_across_time(self,
                                              param_type=None,
                                              param=None,
                                              metric=None,
                                              baseline=False,
                Severity: Minor
                Found in src/triage/component/postmodeling/contrast/model_group_evaluator.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 _write_model_to_db has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    def _write_model_to_db(
                        self,
                        class_path,
                        parameters,
                        feature_names,
                Severity: Minor
                Found in src/triage/component/catwalk/model_trainers.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 best_avg_recency_weight has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                def best_avg_recency_weight(
                    df, train_end_time, metric, parameter, curr_weight, decay_type, n=1
                ):
                    """Pick the model with the highest average metric value so far, penalized
                    for relative variance as:
                Severity: Minor
                Found in src/triage/component/audition/selection_rules.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 plot_prec_across_time has 8 arguments (exceeds 5 allowed). Consider refactoring.
                Open

                    def plot_prec_across_time(self,
                Severity: Major
                Found in src/triage/component/postmodeling/contrast/model_group_evaluator.py - About 50 mins to fix

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

                      def __init__(
                  Severity: Major
                  Found in src/triage/component/collate/collate.py - About 50 mins to fix

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

                        def __init__(
                    Severity: Major
                    Found in src/triage/component/collate/collate.py - About 50 mins to fix

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

                          def __init__(
                      Severity: Major
                      Found in src/tests/utils.py - About 50 mins to fix

                        Function create_entity_date_df has 8 arguments (exceeds 5 allowed). Consider refactoring.
                        Open

                        def create_entity_date_df(
                        Severity: Major
                        Found in src/triage/component/architect/utils.py - About 50 mins to fix

                          Function _train_and_store_model has 8 arguments (exceeds 5 allowed). Consider refactoring.
                          Open

                              def _train_and_store_model(
                          Severity: Major
                          Found in src/triage/component/catwalk/model_trainers.py - About 50 mins to fix

                            Function _write_to_db has 8 arguments (exceeds 5 allowed). Consider refactoring.
                            Open

                                def _write_to_db(
                            Severity: Major
                            Found in src/triage/component/catwalk/evaluation.py - About 50 mins to fix

                              Function process_train_task has 8 arguments (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def process_train_task(
                              Severity: Major
                              Found in src/triage/component/catwalk/model_trainers.py - About 50 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language