wallaroo.wallaroo_ml_ops_api_client.models.explainability_create_request_json_body_window_config API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.explainability_create_request_json_body_window_config

View Source

     1from typing import Any, Dict, List, Type, TypeVar, Union
     2
     3import attr
     4
     5from ..types import UNSET, Unset
     6
     7T = TypeVar("T", bound="ExplainabilityCreateRequestJsonBodyWindowConfig")
     8
     9@attr.s(auto_attribs=True)
    10class ExplainabilityCreateRequestJsonBodyWindowConfig:
    11    """ Specifies if start, end and num samples for the a window of data.
    12
    13    Attributes:
    14        start (Union[Unset, None, str]):  The start of this window of data
    15        end (Union[Unset, None, str]):  The end of this window of data
    16        num_samples (Union[Unset, None, int]):  The number of inference samples to use
    17    """
    18
    19    start: Union[Unset, None, str] = UNSET
    20    end: Union[Unset, None, str] = UNSET
    21    num_samples: Union[Unset, None, int] = UNSET
    22    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    23
    24
    25    def to_dict(self) -> Dict[str, Any]:
    26        start = self.start
    27        end = self.end
    28        num_samples = self.num_samples
    29
    30        field_dict: Dict[str, Any] = {}
    31        field_dict.update(self.additional_properties)
    32        field_dict.update({
    33        })
    34        if start is not UNSET:
    35            field_dict["start"] = start
    36        if end is not UNSET:
    37            field_dict["end"] = end
    38        if num_samples is not UNSET:
    39            field_dict["num_samples"] = num_samples
    40
    41        return field_dict
    42
    43
    44
    45    @classmethod
    46    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    47        d = src_dict.copy()
    48        start = d.pop("start", UNSET)
    49
    50        end = d.pop("end", UNSET)
    51
    52        num_samples = d.pop("num_samples", UNSET)
    53
    54        explainability_create_request_json_body_window_config = cls(
    55            start=start,
    56            end=end,
    57            num_samples=num_samples,
    58        )
    59
    60        explainability_create_request_json_body_window_config.additional_properties = d
    61        return explainability_create_request_json_body_window_config
    62
    63    @property
    64    def additional_keys(self) -> List[str]:
    65        return list(self.additional_properties.keys())
    66
    67    def __getitem__(self, key: str) -> Any:
    68        return self.additional_properties[key]
    69
    70    def __setitem__(self, key: str, value: Any) -> None:
    71        self.additional_properties[key] = value
    72
    73    def __delitem__(self, key: str) -> None:
    74        del self.additional_properties[key]
    75
    76    def __contains__(self, key: str) -> bool:
    77        return key in self.additional_properties

@attr.s(auto_attribs=True)
class ExplainabilityCreateRequestJsonBodyWindowConfig: View Source

    10@attr.s(auto_attribs=True)
    11class ExplainabilityCreateRequestJsonBodyWindowConfig:
    12    """ Specifies if start, end and num samples for the a window of data.
    13
    14    Attributes:
    15        start (Union[Unset, None, str]):  The start of this window of data
    16        end (Union[Unset, None, str]):  The end of this window of data
    17        num_samples (Union[Unset, None, int]):  The number of inference samples to use
    18    """
    19
    20    start: Union[Unset, None, str] = UNSET
    21    end: Union[Unset, None, str] = UNSET
    22    num_samples: Union[Unset, None, int] = UNSET
    23    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    24
    25
    26    def to_dict(self) -> Dict[str, Any]:
    27        start = self.start
    28        end = self.end
    29        num_samples = self.num_samples
    30
    31        field_dict: Dict[str, Any] = {}
    32        field_dict.update(self.additional_properties)
    33        field_dict.update({
    34        })
    35        if start is not UNSET:
    36            field_dict["start"] = start
    37        if end is not UNSET:
    38            field_dict["end"] = end
    39        if num_samples is not UNSET:
    40            field_dict["num_samples"] = num_samples
    41
    42        return field_dict
    43
    44
    45
    46    @classmethod
    47    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    48        d = src_dict.copy()
    49        start = d.pop("start", UNSET)
    50
    51        end = d.pop("end", UNSET)
    52
    53        num_samples = d.pop("num_samples", UNSET)
    54
    55        explainability_create_request_json_body_window_config = cls(
    56            start=start,
    57            end=end,
    58            num_samples=num_samples,
    59        )
    60
    61        explainability_create_request_json_body_window_config.additional_properties = d
    62        return explainability_create_request_json_body_window_config
    63
    64    @property
    65    def additional_keys(self) -> List[str]:
    66        return list(self.additional_properties.keys())
    67
    68    def __getitem__(self, key: str) -> Any:
    69        return self.additional_properties[key]
    70
    71    def __setitem__(self, key: str, value: Any) -> None:
    72        self.additional_properties[key] = value
    73
    74    def __delitem__(self, key: str) -> None:
    75        del self.additional_properties[key]
    76
    77    def __contains__(self, key: str) -> bool:
    78        return key in self.additional_properties

Specifies if start, end and num samples for the a window of data.

Attributes: start (Union[Unset, None, str]): The start of this window of data end (Union[Unset, None, str]): The end of this window of data num_samples (Union[Unset, None, int]): The number of inference samples to use

ExplainabilityCreateRequestJsonBodyWindowConfig( start: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, end: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, num_samples: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, int] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>) View Source

    2def __init__(self, start=attr_dict['start'].default, end=attr_dict['end'].default, num_samples=attr_dict['num_samples'].default):
    3    self.start = start
    4    self.end = end
    5    self.num_samples = num_samples
    6    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class ExplainabilityCreateRequestJsonBodyWindowConfig.

def to_dict(self) -> Dict[str, Any]: View Source

    26    def to_dict(self) -> Dict[str, Any]:
    27        start = self.start
    28        end = self.end
    29        num_samples = self.num_samples
    30
    31        field_dict: Dict[str, Any] = {}
    32        field_dict.update(self.additional_properties)
    33        field_dict.update({
    34        })
    35        if start is not UNSET:
    36            field_dict["start"] = start
    37        if end is not UNSET:
    38            field_dict["end"] = end
    39        if num_samples is not UNSET:
    40            field_dict["num_samples"] = num_samples
    41
    42        return field_dict

@classmethod
def from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T: View Source

    46    @classmethod
    47    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    48        d = src_dict.copy()
    49        start = d.pop("start", UNSET)
    50
    51        end = d.pop("end", UNSET)
    52
    53        num_samples = d.pop("num_samples", UNSET)
    54
    55        explainability_create_request_json_body_window_config = cls(
    56            start=start,
    57            end=end,
    58            num_samples=num_samples,
    59        )
    60
    61        explainability_create_request_json_body_window_config.additional_properties = d
    62        return explainability_create_request_json_body_window_config

additional_keys: List[str]