Skip to content

quast_decisiontree.algorithms.hybrid.builder

quast_decisiontree.algorithms.hybrid.builder

HybridAlgorithmBuilder

Bases: AutoClassBuilder

Builder specialized for HybridAlgorithm subclasses.

Nodes can discover available hybrid algorithms by scanning for all instances of this class (e.g., in a registry or module-level list).

Source code in src/quast_decisiontree/algorithms/hybrid/builder.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class HybridAlgorithmBuilder(AutoClassBuilder):
    """Builder specialized for HybridAlgorithm subclasses.

    Nodes can discover available hybrid algorithms by scanning for all
    instances of this class (e.g., in a registry or module-level list).
    """

    def __init__(
        self,
        superclass,
        hyperparams: list,
        name: str | None = None,
        description: str | None = None,
        input_keys: tuple = (),
    ) -> None:
        super().__init__(
            superclass=superclass,
            hyperparams=hyperparams,
            name=name,
            description=description,
        )
        self.input_keys = input_keys

    @property
    def supported_inputs(self) -> tuple:
        """The INPUT_KEYS of the algorithm this builder constructs."""
        return self.input_keys

input_keys instance-attribute

input_keys = input_keys

supported_inputs property

supported_inputs

The INPUT_KEYS of the algorithm this builder constructs.

__init__

__init__(
    superclass,
    hyperparams,
    name=None,
    description=None,
    input_keys=(),
)
Source code in src/quast_decisiontree/algorithms/hybrid/builder.py
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
def __init__(
    self,
    superclass,
    hyperparams: list,
    name: str | None = None,
    description: str | None = None,
    input_keys: tuple = (),
) -> None:
    super().__init__(
        superclass=superclass,
        hyperparams=hyperparams,
        name=name,
        description=description,
    )
    self.input_keys = input_keys