SaveExplorationUnit
Write an exploration result to disk and publish where it landed.
How the result is serialised is the explorer component's own business —
a Plotly figure as JSON, a DataFrame as JSON, a word cloud as PNG — so the
unit delegates to save_notebook and only owns the destination: the
notebook's folder under NOTEBOOK_PATH, keyed by the notebook id.
The explorer arrives through the context rather than being rebuilt from a configuration of its own, so the object that saves is the object that ran.
Declares only exploration_path: the result itself is on disk, and the
row that records the path belongs to the job.
Parameters
- explorer_id : integer, default=
1 - Identifier of the exploration being saved. It decides the destination folder and the file name, so a re-run overwrites its own artifact and never another exploration's.
Methods
execute(self, ctx: DashAI.back.units.context.ExecutionContext) -> None
SaveExplorationUnitDo 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.