src/triage/experiments/base.py

Summary

Maintainability
D
2 days
Test Coverage

File base.py has 859 lines of code (exceeds 400 allowed). Consider refactoring.
Open

import verboselogs, logging

logger = verboselogs.VerboseLogger(__name__)

from abc import ABC, abstractmethod
Severity: Major
Found in src/triage/experiments/base.py - About 1 day to fix

    Function __init__ has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(
            self,
            config,
            db_engine,
            project_path=None,
    Severity: Minor
    Found in src/triage/experiments/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 __init__ has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def __init__(
            self,
            config,
            db_engine,
            project_path=None,
    Severity: Minor
    Found in src/triage/experiments/base.py - About 1 hr to fix

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

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

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

            def initialize_components(self):
                split_config = self.config["temporal_config"]
        
                self.chopper = Timechop(**split_config)
        
        
        Severity: Minor
        Found in src/triage/experiments/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

        Module level import not at top of file
        Open

        import cProfile
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.component import results_schema
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Line too long (91 > 88 characters)
        Open

                    tables for feature "from objects" that are subqueries. Can speed up performance
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (95 > 88 characters)
        Open

                        "No grid_config was passed in the experiment config. No models will be trained"
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Module level import not at top of file
        Open

        import marshal
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        import itertools
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Line too long (99 > 88 characters)
        Open

                            "Cleanup flag was set to True, so label, cohort and subset tables were deleted"
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (93 > 88 characters)
        Open

                materialize_subquery_fromobjs (bool, default True) Whether or not to create and index
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (113 > 88 characters)
        Open

                        "scoring.subsets missing in the configuration file or unrecognized. No subsets will be generated"
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (98 > 88 characters)
        Open

                        f"Inspect the logs for any matrix building errors. Full list: {missing_matrices}",
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Module level import not at top of file
        Open

        import os
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.component.timechop import Timechop
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Too many leading '#' for block comment
        Open

                    ## Defaults to all the feature_aggregation's prefixes
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Separate inline comments by at least two spaces.

        An inline comment is a comment on the same line as a statement.
        Inline comments should be separated by at least two spaces from the
        statement. They should start with a # and a single space.
        
        Each line of a block comment starts with a # and a single space
        (unless it is indented text inside the comment).
        
        Okay: x = x + 1  # Increment x
        Okay: x = x + 1    # Increment x
        Okay: # Block comment
        E261: x = x + 1 # Increment x
        E262: x = x + 1  #Increment x
        E262: x = x + 1  #  Increment x
        E265: #Block comment
        E266: ### Block comment

        Line too long (96 > 88 characters)
        Open

                    f"Calculating feature aggregation tasks for {len(self.all_as_of_times)} as_of_times"
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (95 > 88 characters)
        Open

                    f"Calculating feature imputation tasks for {len(self.all_as_of_times)} as_of_times"
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Module level import not at top of file
        Open

        from triage.experiments import CONFIG_VERSION
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Line too long (108 > 88 characters)
        Open

                        "Without protected groups, you will not be able to audit your models for bias and fairness."
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (97 > 88 characters)
        Open

                Returns: (list) label timespans, in string form as they appeared in the experiment config
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Module level import not at top of file
        Open

        from triage.component.architect.entity_date_table_generators import (
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Line too long (94 > 88 characters)
        Open

                    "You can view all as_of_times by inspecting `.all_as_of_times` on this Experiment"
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (97 > 88 characters)
        Open

                    f"{','.join(agg.get_table_name(imputed=True) for agg in self.collate_aggregations)} "
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Module level import not at top of file
        Open

        from triage.tracking import (
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.database_reflection import table_has_data
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.util.introspection import bind_kwargs, classpath
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.component.architect.planner import Planner
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Line too long (118 > 88 characters)
        Open

                        "cohort_config missing or unrecognized, but labels are configured. Labels will be used as the cohort."
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (91 > 88 characters)
        Open

                        "tested and evaluated everytime that you run this experiment configuration"
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (117 > 88 characters)
        Open

                        f"""Testing as_of_time range: {min(test_times)} to {max(test_times)} ({len(test_times)} total)\n\n"""
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Module level import not at top of file
        Open

        from triage.experiments.validate import ExperimentValidator
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.util.conf import dt_from_str, parse_from_obj, load_query_if_needed
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Line too long (110 > 88 characters)
        Open

                    of training, which focuses on large modeling algorithms that tend to run with less parallelization
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (89 > 88 characters)
        Open

                            f'Adding as_of_times from test matrix: {test_matrix["as_of_times"]}',
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (98 > 88 characters)
        Open

                    f"Computed {len(all_as_of_times)} total as_of_times for label and feature generation",
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Module level import not at top of file
        Open

        from abc import ABC, abstractmethod
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.component.architect.builders import MatrixBuilder
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.component.catwalk.protected_groups_generators import (
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.component.catwalk.utils import (
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Line too long (91 > 88 characters)
        Open

                        "individual_importance missing in the configuration file or unrecognized, "
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (106 > 88 characters)
        Open

                    f"Computed {len(distinct_as_of_times)} distinct as_of_times for label and feature generation",
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (111 > 88 characters)
        Open

                self.all_as_of_times  # Forcing the calculation of all the as of times, so the logging makes more sense
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Module level import not at top of file
        Open

        from triage.component.catwalk import (
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Line too long (89 > 88 characters)
        Open

                        "No features have been created. Either there is no feature configuration"
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Module level import not at top of file
        Open

        import random
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Line too long (103 > 88 characters)
        Open

                additional_bigtrain_classnames (list) Any additional class names to perform in the second batch
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (104 > 88 characters)
        Open

                    as there is generally parallelization and high memory requirements built into the algorithm.
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Module level import not at top of file
        Open

        from triage.component.architect.features import (
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Too many leading '#' for block comment
        Open

                ###################### RUBICON ######################
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Separate inline comments by at least two spaces.

        An inline comment is a comment on the same line as a statement.
        Inline comments should be separated by at least two spaces from the
        statement. They should start with a # and a single space.
        
        Each line of a block comment starts with a # and a single space
        (unless it is indented text inside the comment).
        
        Okay: x = x + 1  # Increment x
        Okay: x = x + 1    # Increment x
        Okay: # Block comment
        E261: x = x + 1 # Increment x
        E262: x = x + 1  #Increment x
        E262: x = x + 1  #  Increment x
        E265: #Block comment
        E266: ### Block comment

        Multiple imports on one line
        Open

        import verboselogs, logging
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports on separate lines.

        Okay: import os\nimport sys
        E401: import sys, os
        
        Okay: from subprocess import Popen, PIPE
        Okay: from myclas import MyClass
        Okay: from foo.bar.yourclass import YourClass
        Okay: import myclass
        Okay: import foo.bar.yourclass

        Module level import not at top of file
        Open

        import time
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from timeout import timeout
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.component.architect.label_generators import (
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.util.db import get_for_update
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Too many leading '#' for block comment
        Open

                    ## Defaults to sane values
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Separate inline comments by at least two spaces.

        An inline comment is a comment on the same line as a statement.
        Inline comments should be separated by at least two spaces from the
        statement. They should start with a # and a single space.
        
        Each line of a block comment starts with a # and a single space
        (unless it is indented text inside the comment).
        
        Okay: x = x + 1  # Increment x
        Okay: x = x + 1    # Increment x
        Okay: # Block comment
        E261: x = x + 1 # Increment x
        E262: x = x + 1  #Increment x
        E262: x = x + 1  #  Increment x
        E265: #Block comment
        E266: ### Block comment

        Line too long (117 > 88 characters)
        Open

                        f"""Training as_of_time_range: {min(train_times)} to {max(train_times)} ({len(train_times)} total)"""
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (95 > 88 characters)
        Open

                        f'Adding as_of_times from train matrix: {split["train_matrix"]["as_of_times"]}'
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (93 > 88 characters)
        Open

                        f"{experiment.grid_size} models groups will be trained, tested and evaluated"
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Module level import not at top of file
        Open

        from descriptors import cachedproperty
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.component.catwalk.storage import (
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        Module level import not at top of file
        Open

        from triage.experiments.defaults import (
        Severity: Minor
        Found in src/triage/experiments/base.py by pep8

        Place imports at the top of the file.

        Always put imports at the top of the file, just after any module
        comments and docstrings, and before module globals and constants.
        
        Okay: import os
        Okay: # this is a comment\nimport os
        Okay: '''this is a module docstring'''\nimport os
        Okay: r'''this is a module docstring'''\nimport os
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
        Okay:
        try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
        E402: a=1\nimport os
        E402: 'One string'\n"Two string"\nimport os
        E402: a=1\nfrom sys import x
        
        Okay: if x:\n    import os

        There are no issues that match your filters.

        Category
        Status