wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item_summarizer_type_0 API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item_summarizer_type_0

View Source

      1from typing import Any, Dict, List, Type, TypeVar, Union, cast
      2
      3import attr
      4
      5from ..models.assays_list_response_200_item_summarizer_type_0_aggregation import \
      6    AssaysListResponse200ItemSummarizerType0Aggregation
      7from ..models.assays_list_response_200_item_summarizer_type_0_bin_mode import \
      8    AssaysListResponse200ItemSummarizerType0BinMode
      9from ..models.assays_list_response_200_item_summarizer_type_0_metric import \
     10    AssaysListResponse200ItemSummarizerType0Metric
     11from ..models.assays_list_response_200_item_summarizer_type_0_type import \
     12    AssaysListResponse200ItemSummarizerType0Type
     13from ..types import UNSET, Unset
     14
     15T = TypeVar("T", bound="AssaysListResponse200ItemSummarizerType0")
     16
     17@attr.s(auto_attribs=True)
     18class AssaysListResponse200ItemSummarizerType0:
     19    """ Defines the summarizer/test we want to conduct
     20
     21    Attributes:
     22        bin_mode (AssaysListResponse200ItemSummarizerType0BinMode):
     23        aggregation (AssaysListResponse200ItemSummarizerType0Aggregation):
     24        metric (AssaysListResponse200ItemSummarizerType0Metric):  How we calculate the score between two
     25            histograms/vecs.  Add pct_diff and sum_pct_diff?
     26        num_bins (int):
     27        type (AssaysListResponse200ItemSummarizerType0Type):
     28        bin_weights (Union[Unset, None, List[float]]):
     29        provided_edges (Union[Unset, None, List[float]]):
     30    """
     31
     32    bin_mode: AssaysListResponse200ItemSummarizerType0BinMode
     33    aggregation: AssaysListResponse200ItemSummarizerType0Aggregation
     34    metric: AssaysListResponse200ItemSummarizerType0Metric
     35    num_bins: int
     36    type: AssaysListResponse200ItemSummarizerType0Type
     37    bin_weights: Union[Unset, None, List[float]] = UNSET
     38    provided_edges: Union[Unset, None, List[float]] = UNSET
     39    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     40
     41
     42    def to_dict(self) -> Dict[str, Any]:
     43        bin_mode = self.bin_mode.value
     44
     45        aggregation = self.aggregation.value
     46
     47        metric = self.metric.value
     48
     49        num_bins = self.num_bins
     50        type = self.type.value
     51
     52        bin_weights: Union[Unset, None, List[float]] = UNSET
     53        if not isinstance(self.bin_weights, Unset):
     54            if self.bin_weights is None:
     55                bin_weights = None
     56            else:
     57                bin_weights = self.bin_weights
     58
     59
     60
     61
     62        provided_edges: Union[Unset, None, List[float]] = UNSET
     63        if not isinstance(self.provided_edges, Unset):
     64            if self.provided_edges is None:
     65                provided_edges = None
     66            else:
     67                provided_edges = self.provided_edges
     68
     69
     70
     71
     72
     73        field_dict: Dict[str, Any] = {}
     74        field_dict.update(self.additional_properties)
     75        field_dict.update({
     76            "bin_mode": bin_mode,
     77            "aggregation": aggregation,
     78            "metric": metric,
     79            "num_bins": num_bins,
     80            "type": type,
     81        })
     82        if bin_weights is not UNSET:
     83            field_dict["bin_weights"] = bin_weights
     84        if provided_edges is not UNSET:
     85            field_dict["provided_edges"] = provided_edges
     86
     87        return field_dict
     88
     89
     90
     91    @classmethod
     92    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
     93        d = src_dict.copy()
     94        bin_mode = AssaysListResponse200ItemSummarizerType0BinMode(d.pop("bin_mode"))
     95
     96
     97
     98
     99        aggregation = AssaysListResponse200ItemSummarizerType0Aggregation(d.pop("aggregation"))
    100
    101
    102
    103
    104        metric = AssaysListResponse200ItemSummarizerType0Metric(d.pop("metric"))
    105
    106
    107
    108
    109        num_bins = d.pop("num_bins")
    110
    111        type = AssaysListResponse200ItemSummarizerType0Type(d.pop("type"))
    112
    113
    114
    115
    116        bin_weights = cast(List[float], d.pop("bin_weights", UNSET))
    117
    118
    119        provided_edges = cast(List[float], d.pop("provided_edges", UNSET))
    120
    121
    122        assays_list_response_200_item_summarizer_type_0 = cls(
    123            bin_mode=bin_mode,
    124            aggregation=aggregation,
    125            metric=metric,
    126            num_bins=num_bins,
    127            type=type,
    128            bin_weights=bin_weights,
    129            provided_edges=provided_edges,
    130        )
    131
    132        assays_list_response_200_item_summarizer_type_0.additional_properties = d
    133        return assays_list_response_200_item_summarizer_type_0
    134
    135    @property
    136    def additional_keys(self) -> List[str]:
    137        return list(self.additional_properties.keys())
    138
    139    def __getitem__(self, key: str) -> Any:
    140        return self.additional_properties[key]
    141
    142    def __setitem__(self, key: str, value: Any) -> None:
    143        self.additional_properties[key] = value
    144
    145    def __delitem__(self, key: str) -> None:
    146        del self.additional_properties[key]
    147
    148    def __contains__(self, key: str) -> bool:
    149        return key in self.additional_properties

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

     18@attr.s(auto_attribs=True)
     19class AssaysListResponse200ItemSummarizerType0:
     20    """ Defines the summarizer/test we want to conduct
     21
     22    Attributes:
     23        bin_mode (AssaysListResponse200ItemSummarizerType0BinMode):
     24        aggregation (AssaysListResponse200ItemSummarizerType0Aggregation):
     25        metric (AssaysListResponse200ItemSummarizerType0Metric):  How we calculate the score between two
     26            histograms/vecs.  Add pct_diff and sum_pct_diff?
     27        num_bins (int):
     28        type (AssaysListResponse200ItemSummarizerType0Type):
     29        bin_weights (Union[Unset, None, List[float]]):
     30        provided_edges (Union[Unset, None, List[float]]):
     31    """
     32
     33    bin_mode: AssaysListResponse200ItemSummarizerType0BinMode
     34    aggregation: AssaysListResponse200ItemSummarizerType0Aggregation
     35    metric: AssaysListResponse200ItemSummarizerType0Metric
     36    num_bins: int
     37    type: AssaysListResponse200ItemSummarizerType0Type
     38    bin_weights: Union[Unset, None, List[float]] = UNSET
     39    provided_edges: Union[Unset, None, List[float]] = UNSET
     40    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     41
     42
     43    def to_dict(self) -> Dict[str, Any]:
     44        bin_mode = self.bin_mode.value
     45
     46        aggregation = self.aggregation.value
     47
     48        metric = self.metric.value
     49
     50        num_bins = self.num_bins
     51        type = self.type.value
     52
     53        bin_weights: Union[Unset, None, List[float]] = UNSET
     54        if not isinstance(self.bin_weights, Unset):
     55            if self.bin_weights is None:
     56                bin_weights = None
     57            else:
     58                bin_weights = self.bin_weights
     59
     60
     61
     62
     63        provided_edges: Union[Unset, None, List[float]] = UNSET
     64        if not isinstance(self.provided_edges, Unset):
     65            if self.provided_edges is None:
     66                provided_edges = None
     67            else:
     68                provided_edges = self.provided_edges
     69
     70
     71
     72
     73
     74        field_dict: Dict[str, Any] = {}
     75        field_dict.update(self.additional_properties)
     76        field_dict.update({
     77            "bin_mode": bin_mode,
     78            "aggregation": aggregation,
     79            "metric": metric,
     80            "num_bins": num_bins,
     81            "type": type,
     82        })
     83        if bin_weights is not UNSET:
     84            field_dict["bin_weights"] = bin_weights
     85        if provided_edges is not UNSET:
     86            field_dict["provided_edges"] = provided_edges
     87
     88        return field_dict
     89
     90
     91
     92    @classmethod
     93    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
     94        d = src_dict.copy()
     95        bin_mode = AssaysListResponse200ItemSummarizerType0BinMode(d.pop("bin_mode"))
     96
     97
     98
     99
    100        aggregation = AssaysListResponse200ItemSummarizerType0Aggregation(d.pop("aggregation"))
    101
    102
    103
    104
    105        metric = AssaysListResponse200ItemSummarizerType0Metric(d.pop("metric"))
    106
    107
    108
    109
    110        num_bins = d.pop("num_bins")
    111
    112        type = AssaysListResponse200ItemSummarizerType0Type(d.pop("type"))
    113
    114
    115
    116
    117        bin_weights = cast(List[float], d.pop("bin_weights", UNSET))
    118
    119
    120        provided_edges = cast(List[float], d.pop("provided_edges", UNSET))
    121
    122
    123        assays_list_response_200_item_summarizer_type_0 = cls(
    124            bin_mode=bin_mode,
    125            aggregation=aggregation,
    126            metric=metric,
    127            num_bins=num_bins,
    128            type=type,
    129            bin_weights=bin_weights,
    130            provided_edges=provided_edges,
    131        )
    132
    133        assays_list_response_200_item_summarizer_type_0.additional_properties = d
    134        return assays_list_response_200_item_summarizer_type_0
    135
    136    @property
    137    def additional_keys(self) -> List[str]:
    138        return list(self.additional_properties.keys())
    139
    140    def __getitem__(self, key: str) -> Any:
    141        return self.additional_properties[key]
    142
    143    def __setitem__(self, key: str, value: Any) -> None:
    144        self.additional_properties[key] = value
    145
    146    def __delitem__(self, key: str) -> None:
    147        del self.additional_properties[key]
    148
    149    def __contains__(self, key: str) -> bool:
    150        return key in self.additional_properties

Defines the summarizer/test we want to conduct

Attributes: bin_mode (AssaysListResponse200ItemSummarizerType0BinMode): aggregation (AssaysListResponse200ItemSummarizerType0Aggregation): metric (AssaysListResponse200ItemSummarizerType0Metric): How we calculate the score between two histograms/vecs. Add pct_diff and sum_pct_diff? num_bins (int): type (AssaysListResponse200ItemSummarizerType0Type): bin_weights (Union[Unset, None, List[float]]): provided_edges (Union[Unset, None, List[float]]):

AssaysListResponse200ItemSummarizerType0( bin_mode: wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item_summarizer_type_0_bin_mode.AssaysListResponse200ItemSummarizerType0BinMode, aggregation: wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item_summarizer_type_0_aggregation.AssaysListResponse200ItemSummarizerType0Aggregation, metric: wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item_summarizer_type_0_metric.AssaysListResponse200ItemSummarizerType0Metric, num_bins: int, type: wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item_summarizer_type_0_type.AssaysListResponse200ItemSummarizerType0Type, bin_weights: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, List[float]] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, provided_edges: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, List[float]] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>) View Source

     2def __init__(self, bin_mode, aggregation, metric, num_bins, type, bin_weights=attr_dict['bin_weights'].default, provided_edges=attr_dict['provided_edges'].default):
     3    self.bin_mode = bin_mode
     4    self.aggregation = aggregation
     5    self.metric = metric
     6    self.num_bins = num_bins
     7    self.type = type
     8    self.bin_weights = bin_weights
     9    self.provided_edges = provided_edges
    10    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class AssaysListResponse200ItemSummarizerType0.

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

    43    def to_dict(self) -> Dict[str, Any]:
    44        bin_mode = self.bin_mode.value
    45
    46        aggregation = self.aggregation.value
    47
    48        metric = self.metric.value
    49
    50        num_bins = self.num_bins
    51        type = self.type.value
    52
    53        bin_weights: Union[Unset, None, List[float]] = UNSET
    54        if not isinstance(self.bin_weights, Unset):
    55            if self.bin_weights is None:
    56                bin_weights = None
    57            else:
    58                bin_weights = self.bin_weights
    59
    60
    61
    62
    63        provided_edges: Union[Unset, None, List[float]] = UNSET
    64        if not isinstance(self.provided_edges, Unset):
    65            if self.provided_edges is None:
    66                provided_edges = None
    67            else:
    68                provided_edges = self.provided_edges
    69
    70
    71
    72
    73
    74        field_dict: Dict[str, Any] = {}
    75        field_dict.update(self.additional_properties)
    76        field_dict.update({
    77            "bin_mode": bin_mode,
    78            "aggregation": aggregation,
    79            "metric": metric,
    80            "num_bins": num_bins,
    81            "type": type,
    82        })
    83        if bin_weights is not UNSET:
    84            field_dict["bin_weights"] = bin_weights
    85        if provided_edges is not UNSET:
    86            field_dict["provided_edges"] = provided_edges
    87
    88        return field_dict

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

     92    @classmethod
     93    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
     94        d = src_dict.copy()
     95        bin_mode = AssaysListResponse200ItemSummarizerType0BinMode(d.pop("bin_mode"))
     96
     97
     98
     99
    100        aggregation = AssaysListResponse200ItemSummarizerType0Aggregation(d.pop("aggregation"))
    101
    102
    103
    104
    105        metric = AssaysListResponse200ItemSummarizerType0Metric(d.pop("metric"))
    106
    107
    108
    109
    110        num_bins = d.pop("num_bins")
    111
    112        type = AssaysListResponse200ItemSummarizerType0Type(d.pop("type"))
    113
    114
    115
    116
    117        bin_weights = cast(List[float], d.pop("bin_weights", UNSET))
    118
    119
    120        provided_edges = cast(List[float], d.pop("provided_edges", UNSET))
    121
    122
    123        assays_list_response_200_item_summarizer_type_0 = cls(
    124            bin_mode=bin_mode,
    125            aggregation=aggregation,
    126            metric=metric,
    127            num_bins=num_bins,
    128            type=type,
    129            bin_weights=bin_weights,
    130            provided_edges=provided_edges,
    131        )
    132
    133        assays_list_response_200_item_summarizer_type_0.additional_properties = d
    134        return assays_list_response_200_item_summarizer_type_0

additional_keys: List[str]