caikit.interfaces.ts.data_model.backends.base

Base classes to share between data model backends

Attributes

log

error

Classes

UncachedBackendMixin

Intermediate base class that disables attribute caching

StrictFieldBackendMixin

Intermediate base class that raises attribute errors for unknown fields

TimeSeriesBackendBase

Abstract base class for all backends of the central TimeSeries data model

MultiTimeSeriesBackendBase

Abstract base class for all backends of the central MultiTimeSeries data model

Module Contents

caikit.interfaces.ts.data_model.backends.base.log[source]
caikit.interfaces.ts.data_model.backends.base.error
class caikit.interfaces.ts.data_model.backends.base.UncachedBackendMixin[source]

Bases: caikit.core.data_model.data_backends.DataModelBackendBase

Intermediate base class that disables attribute caching

cache_attribute(*_, **__) bool[source]

Never cache attributes

class caikit.interfaces.ts.data_model.backends.base.StrictFieldBackendMixin[source]

Bases: caikit.core.data_model.data_backends.DataModelBackendBase

Intermediate base class that raises attribute errors for unknown fields

get_attribute(data_model_class: Type, name: str) Any[source]

Base implementation that raises an AttributeError on bad attr names. It should be called after object-specific logic.

class caikit.interfaces.ts.data_model.backends.base.TimeSeriesBackendBase[source]

Bases: UncachedBackendMixin, StrictFieldBackendMixin

Abstract base class for all backends of the central TimeSeries data model type

abstract as_pandas() Tuple[pandas.DataFrame, str, Iterable[str]][source]

All backends must implement the ability to coerce their underlying data into a pandas DataFrame and provide the pointers to the timeseries source and value source(s)

Returns:
df: pd.DataFrame

The data frame itself

timestamp_source: str

The column name (or None) indicating where the timestamp sequence can be found

value_source: Iterable[str]

The names of the columns holding value sequences

class caikit.interfaces.ts.data_model.backends.base.MultiTimeSeriesBackendBase[source]

Bases: UncachedBackendMixin, StrictFieldBackendMixin

Abstract base class for all backends of the central MultiTimeSeries data model type

abstract as_pandas() Tuple[pandas.DataFrame, Iterable[str], str, Iterable[str]][source]

All backends must implement the ability to coerce their underlying data into a pandas DataFrame and provide the pointers to the timeseries source and value source(s)

Returns:
df: pd.DataFrame

The data frame itself

key_source: Iterable[str]

the names of the columns holding key values

timestamp_source: str

The column name (or None) indicating where the timestamp sequence can be found

value_source: Iterable[str]

The names of the columns holding value sequences