TimeIndexAuditExplorer
Report whether a date column can carry a forecast at all.
Every model in ForecastingTask reads the series by position and
assumes one value per period, no period missing and none repeated. A date
column rarely says so out loud: a shop closed on Sundays, a sensor that
dropped out for a week and two readings on the same afternoon all look
like an ordinary column of dates until a model quietly forecasts the
wrong calendar.
This explorer answers that question before any model is fitted. It names the spacing the dates actually sit on, counts the periods missing from that grid, the repeated dates and the rows carrying no date at all, and reports the largest hole in the series.
A report with a named frequency, no missing period and no duplicate is
ready to forecast. Anything else is what TimeResamplerConverter is
for: it rebuilds the table on a regular grid, aggregating the repeats and
filling the holes the way the data deserves.
Methods
get_results(self, exploration_path: str, options: Dict[str, Any]) -> List[DashAI.back.core.artifacts.Artifact]
TimeIndexAuditExplorerLoad and return the saved audit for the frontend.
Parameters
- exploration_path : str
- Path to the JSON file saved by
save_notebook. - options : Dict[str, Any]
- Rendering options from the frontend (unused).
Returns
- List[Artifact]
- A single element list with the table artifact of the audit.
launch_exploration(self, dataset: 'DashAIDataset', explorer_info: DashAI.back.dependencies.database.models.Explorer)
TimeIndexAuditExplorerAudit the selected date column.
Parameters
- dataset : DashAIDataset
- The prepared dataset holding the selected column.
- explorer_info : Explorer
- Explorer record with the column names.
Returns
- pandas.DataFrame
- A two column frame,
metricandvalue, holding one row per checked property.
save_notebook(self, notebook_info: DashAI.back.dependencies.database.models.Notebook, explorer_info: DashAI.back.dependencies.database.models.Explorer, save_path: 'Path', result: Any) -> str
TimeIndexAuditExplorerSave the audit table to a JSON file on disk.
Parameters
- notebook_info : Notebook
- The notebook database record (unused).
- explorer_info : Explorer
- The explorer record used for filename generation.
- save_path : Path
- Directory where the file will be saved.
- result : Any
- The
pandas.DataFramereturned bylaunch_exploration.
Returns
- str
- The path of the saved JSON file as a POSIX string.
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_metadata(cls) -> Dict[str, Any]
BaseExplorerGet metadata for the explorer, used by the DashAI frontend.
Returns
- Dict[str, Any]
- Dictionary containing display name, description, image preview path, category, icon, color, allowed semantic types, allowed dtypes, and input cardinality constraints.
get_schema(cls) -> dict
ConfigObjectGenerates the component related Json Schema.
Returns
- dict
- Dictionary representing the Json Schema of the component.
prepare_dataset(self, loaded_dataset: 'DashAIDataset', columns: List[Dict[str, Any]]) -> 'DashAIDataset'
BaseExplorerPrepare the dataset by selecting only the columns needed for this exploration.
Parameters
- loaded_dataset : DashAIDataset
- The full dataset loaded from storage.
- columns : List[Dict[str, Any]]
- List of column descriptor dicts, each containing at least
"columnName". Optional keys:"id","valueType","dataType".
Returns
- DashAIDataset
- Dataset restricted to the requested columns.
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.
validate_columns(cls, explorer_info: DashAI.back.dependencies.database.models.Explorer, column_spec: Dict[str, Dict[str, str]]) -> bool
BaseExplorerValidate that the selected columns satisfy the explorer's constraints.
Parameters
- explorer_info : Explorer
- The database record for the explorer instance, including the selected columns.
- column_spec : Dict[str, Dict[str, str]]
- A mapping from column name to a dict with at least
"type"(semantic type name) and"dtype"(dtype string).
Returns
- bool
- True if all column constraints are satisfied, False otherwise.
validate_parameters(cls, params: Dict[str, Any]) -> bool
BaseExplorerValidate explorer parameters against the explorer's schema.
Parameters
- params : Dict[str, Any]
- The configuration parameters to validate.
Returns
- BaseExplorerSchema
- The validated and parsed schema instance. Subclasses that override this method may return a bool to indicate pass/fail without returning the model instance.