ensemble module

Full Documentation for hippynn.graphs.ensemble module. Click here for a summary page.

collate_inputs(models: list[GraphModule], inputs: List[str]) Dict[str, List[GraphModule]][source]
Parameters:
  • models

  • inputs

Returns:

collate_targets(models: List[GraphModule], targets: List[str]) Dict[str, List[_BaseNode]][source]
construct_outputs(output_classes: Dict[str, List[GraphModule]], prefix: str) List[EnsembleTarget][source]
get_graphs(models: List[str | GraphModule | _BaseNode] | str) List[GraphModule][source]
Parameters:

models

Returns:

identify_inputs(models: list[GraphModule]) set[str][source]
identify_targets(models: List[GraphModule]) set[str][source]
make_ensemble(models, *, targets: List[str] = 'auto', inputs: List[str] = 'auto', prefix: str = 'ensemble_', quiet=False) Tuple[GraphModule, Tuple[Dict[str, int], Dict[str, int]]][source]
Parameters:
  • models – list containing str, node, or graphmodule, or str to glob for model directories.

  • targets – list of db_name strings or the string ‘auto’, which will attempt to infer.

  • inputs – list of db_name strings of the string ‘auto’, which will attempt to infer.

  • prefix – specifies the prefix for the db_name of created ensemble nodes.

  • quiet – whether to print information about the constructed ensemble.

Returns:

ensemble GraphModule, (intput_info, output_info)

make_ensemble_graph(ensemble_inputs: List[InputNode], ensemble_outputs: List[EnsembleTarget]) GraphModule[source]
make_ensemble_info(input_classes: Dict[str, List[GraphModule]], output_classes: Dict[str, List[GraphModule]], quiet=False)[source]
replace_inputs(input_classes: Dict[str, List[GraphModule]]) List[InputNode][source]