from __future__ import annotations
from typing import Any
from rail.projects.dynamic_class import DynamicClass
from .validation import validate_inputs
[docs]
class RailDataset(DynamicClass):
"""Base class for datasets
Subclasses should implement the `data_types` data member
to show what the expected data are.
For example:
.. highlight:: python
.. code-block:: python
data_types = dict(
truth: np.ndarray,
point_estimate: np.ndarry,
)
"""
data_types: dict[str, type] = {}
sub_classes: dict[str, type[DynamicClass]] = {}
[docs]
@classmethod
def full_class_name(cls) -> str:
"""Return the full name of the class, including the parent module"""
return f"{cls.__module__}.{cls.__name__}"
def __repr__(self) -> str:
the_class = self.__class__
return f"{the_class.__name__}"