Skip to main content

RunExplorationUnit

Unit
DashAI.back.units.RunExplorationUnit

Instantiate an explorer component and run it over the dataset.

Preparing the dataset and launching the exploration are one unit, not two: prepare_dataset is a hook on the explorer component itself (BaseExplorer.prepare_dataset), so it does not exist without an instantiated explorer. Splitting them would force the live explorer instance through the context, which is instance state wearing a context key's clothes.

The unit re-reads the Explorer row because the component API takes it: prepare_dataset needs its columns and launch_exploration receives the row itself. The read is strictly read-only — the row's status belongs to the job.

The explorer instance is published alongside the result because saving is also a method on it (save_notebook). Handing over the same object, rather than letting the save unit build its own from the same configuration, is what keeps a stateful explorer working: CorrMatrix and CovMatrix read self.plot while saving. Same shape as BuildModelUnit publishing model for SaveModelUnit.

Parameters​

explorer_id : integer, default=1
Identifier of the exploration whose selected columns and display name the explorer component reads.
explorer : object
Exploration to run, together with its own configuration.

Methods​

execute(self, ctx: DashAI.back.units.context.ExecutionContext) -> None

Defined on RunExplorationUnit

Do the unit's work, reading from and writing to the context.

Parameters

ctx : ExecutionContext
The shared execution context.

get_credential(self, name: str)

Defined on ConfigObject

Resolve 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

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

validate(self, ctx: DashAI.back.units.context.ExecutionContext) -> None

Defined on BaseUnit

Check preconditions without executing the unit.

Parameters

ctx : ExecutionContext
The shared execution context.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It 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.