BuildGlobalExplainerUnit
Instantiate a global explainer over an already trained model.
Sibling of BuildLocalExplainerUnit rather than one unit with a scope
flag, even though the building step itself is identical — the two share it
through a helper. Global and local explainers are separate registries with
separate base classes, and a component field carries a single parent
hint that the front reads straight off the property to list the candidates.
One field covering both scopes would have to be optional, and an optional
component field is emitted as an anyOf, which buries the hint where the
front does not look and leaves the user with no picker at all.
Parameters
- explainer : object
- Explainer for the model as a whole, together with its own configuration.
Methods
execute(self, ctx: DashAI.back.units.context.ExecutionContext) -> None
BuildGlobalExplainerUnitDo the unit's work, reading from and writing to the context.
Parameters
- ctx : ExecutionContext
- The shared execution context.
get_credential(self, name: str)
ConfigObjectResolve a registered credential component by name.
Parameters
- name : str
- Credential component class name (e.g. "HuggingFaceCredential").
Returns
- BaseCredential
- An instance of the requested credential component.
get_schema(cls) -> dict
ConfigObjectGenerates the component related Json Schema.
Returns
- dict
- Dictionary representing the Json Schema of the component.
validate(self, ctx: DashAI.back.units.context.ExecutionContext) -> None
BaseUnitCheck preconditions without executing the unit.
Parameters
- ctx : ExecutionContext
- The shared execution context.
validate_and_transform(self, raw_data: dict) -> dict
ConfigObjectIt takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.
Parameters
- raw_data : dict
- A dictionary with the data provided by the user to initialize the model.
Returns
- dict
- A validated dictionary with the necessary objects.