nip.factory.register_scenario_class

nip.factory.register_scenario_class#

nip.factory.register_scenario_class(scenario: Literal['graph_isomorphism', 'image_classification', 'code_validation'], base_class: type, filter: dict[str, str] = {})[source]#

Register a component with a scenario.

Parameters:
  • scenario (ScenarioType) – The scenario with which to register the component.

  • base_class (type) – The base class of the component being registered.

  • filter (dict[str, str], default={}) – The filter to use to select when to use the class based on the parameters. This is a set of addresses and values to match the parameter value. filter[address] = value means that the parameter value at address must be value. All must match for the class to be retrieved. An empty dictionary will always match.