wallaroo.wallaroo_ml_ops_api_client.api.explainability.explainability_list_configs_by_pipeline API documentation

# wallaroo.wallaroo_ml_ops_api_client.api.explainability.explainability_list_configs_by_pipeline

View Source

      1from typing import Any, Dict, List, Optional, Union
      2
      3import httpx
      4
      5from ...client import Client
      6from ...models.explainability_list_configs_by_pipeline_json_body import \
      7    ExplainabilityListConfigsByPipelineJsonBody
      8from ...models.explainability_list_configs_by_pipeline_response_200_item import \
      9    ExplainabilityListConfigsByPipelineResponse200Item
     10from ...models.explainability_list_configs_by_pipeline_response_400 import \
     11    ExplainabilityListConfigsByPipelineResponse400
     12from ...models.explainability_list_configs_by_pipeline_response_401 import \
     13    ExplainabilityListConfigsByPipelineResponse401
     14from ...models.explainability_list_configs_by_pipeline_response_500 import \
     15    ExplainabilityListConfigsByPipelineResponse500
     16from ...types import Response
     17
     18
     19def _get_kwargs(
     20    *,
     21    client: Client,
     22    json_body: ExplainabilityListConfigsByPipelineJsonBody,
     23
     24) -> Dict[str, Any]:
     25    url = "{}/v1/api/explainability/list_configs_by_pipeline".format(
     26        client.base_url)
     27
     28    headers: Dict[str, str] = client.get_headers()
     29    cookies: Dict[str, Any] = client.get_cookies()
     30
     31
     32
     33
     34
     35
     36
     37    json_json_body = json_body.to_dict()
     38
     39
     40
     41
     42
     43    return {
     44	    "method": "post",
     45        "url": url,
     46        "headers": headers,
     47        "cookies": cookies,
     48        "timeout": client.get_timeout(),
     49        "json": json_json_body,
     50    }
     51
     52
     53def _parse_response(*, response: httpx.Response) -> Optional[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]:
     54    if response.status_code == 500:
     55        response_500 = ExplainabilityListConfigsByPipelineResponse500.from_dict(response.json())
     56
     57
     58
     59        return response_500
     60    if response.status_code == 400:
     61        response_400 = ExplainabilityListConfigsByPipelineResponse400.from_dict(response.json())
     62
     63
     64
     65        return response_400
     66    if response.status_code == 401:
     67        response_401 = ExplainabilityListConfigsByPipelineResponse401.from_dict(response.json())
     68
     69
     70
     71        return response_401
     72    if response.status_code == 200:
     73        response_200 = []
     74        _response_200 = response.json()
     75        for response_200_item_data in (_response_200):
     76            _response_200_item = response_200_item_data
     77            response_200_item: Optional[ExplainabilityListConfigsByPipelineResponse200Item]
     78            if _response_200_item is None:
     79                response_200_item = None
     80            else:
     81                response_200_item = ExplainabilityListConfigsByPipelineResponse200Item.from_dict(_response_200_item)
     82
     83
     84
     85            response_200.append(response_200_item)
     86
     87        return response_200
     88    return None
     89
     90
     91def _build_response(*, response: httpx.Response) -> Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]:
     92    return Response(
     93        status_code=response.status_code,
     94        content=response.content,
     95        headers=response.headers,
     96        parsed=_parse_response(response=response),
     97    )
     98
     99
    100def sync_detailed(
    101    *,
    102    client: Client,
    103    json_body: ExplainabilityListConfigsByPipelineJsonBody,
    104
    105) -> Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]:
    106    """List explainability configs for a given pipeline
    107
    108     Returns a list of explainability configs for the specified pipeline.
    109
    110    Args:
    111        json_body (ExplainabilityListConfigsByPipelineJsonBody):
    112
    113    Returns:
    114        Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]
    115    """
    116
    117
    118    kwargs = _get_kwargs(
    119        client=client,
    120json_body=json_body,
    121
    122    )
    123
    124    response = httpx.request(
    125        verify=client.verify_ssl,
    126        **kwargs,
    127    )
    128
    129    return _build_response(response=response)
    130
    131def sync(
    132    *,
    133    client: Client,
    134    json_body: ExplainabilityListConfigsByPipelineJsonBody,
    135
    136) -> Optional[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]:
    137    """List explainability configs for a given pipeline
    138
    139     Returns a list of explainability configs for the specified pipeline.
    140
    141    Args:
    142        json_body (ExplainabilityListConfigsByPipelineJsonBody):
    143
    144    Returns:
    145        Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]
    146    """
    147
    148
    149    return sync_detailed(
    150        client=client,
    151json_body=json_body,
    152
    153    ).parsed
    154
    155async def asyncio_detailed(
    156    *,
    157    client: Client,
    158    json_body: ExplainabilityListConfigsByPipelineJsonBody,
    159
    160) -> Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]:
    161    """List explainability configs for a given pipeline
    162
    163     Returns a list of explainability configs for the specified pipeline.
    164
    165    Args:
    166        json_body (ExplainabilityListConfigsByPipelineJsonBody):
    167
    168    Returns:
    169        Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]
    170    """
    171
    172
    173    kwargs = _get_kwargs(
    174        client=client,
    175json_body=json_body,
    176
    177    )
    178
    179    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    180        response = await _client.request(
    181            **kwargs
    182        )
    183
    184    return _build_response(response=response)
    185
    186async def asyncio(
    187    *,
    188    client: Client,
    189    json_body: ExplainabilityListConfigsByPipelineJsonBody,
    190
    191) -> Optional[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]:
    192    """List explainability configs for a given pipeline
    193
    194     Returns a list of explainability configs for the specified pipeline.
    195
    196    Args:
    197        json_body (ExplainabilityListConfigsByPipelineJsonBody):
    198
    199    Returns:
    200        Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]
    201    """
    202
    203
    204    return (await asyncio_detailed(
    205        client=client,
    206json_body=json_body,
    207
    208    )).parsed

def sync_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_json_body.ExplainabilityListConfigsByPipelineJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_400.ExplainabilityListConfigsByPipelineResponse400, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_401.ExplainabilityListConfigsByPipelineResponse401, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_500.ExplainabilityListConfigsByPipelineResponse500, typing.List[typing.Optional[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_200_item.ExplainabilityListConfigsByPipelineResponse200Item]]]]: View Source

    101def sync_detailed(
    102    *,
    103    client: Client,
    104    json_body: ExplainabilityListConfigsByPipelineJsonBody,
    105
    106) -> Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]:
    107    """List explainability configs for a given pipeline
    108
    109     Returns a list of explainability configs for the specified pipeline.
    110
    111    Args:
    112        json_body (ExplainabilityListConfigsByPipelineJsonBody):
    113
    114    Returns:
    115        Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]
    116    """
    117
    118
    119    kwargs = _get_kwargs(
    120        client=client,
    121json_body=json_body,
    122
    123    )
    124
    125    response = httpx.request(
    126        verify=client.verify_ssl,
    127        **kwargs,
    128    )
    129
    130    return _build_response(response=response)

List explainability configs for a given pipeline

Returns a list of explainability configs for the specified pipeline.

Args: json_body (ExplainabilityListConfigsByPipelineJsonBody):

Returns: Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]

def sync( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_json_body.ExplainabilityListConfigsByPipelineJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_400.ExplainabilityListConfigsByPipelineResponse400, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_401.ExplainabilityListConfigsByPipelineResponse401, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_500.ExplainabilityListConfigsByPipelineResponse500, List[Optional[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_200_item.ExplainabilityListConfigsByPipelineResponse200Item]], NoneType]: View Source

    132def sync(
    133    *,
    134    client: Client,
    135    json_body: ExplainabilityListConfigsByPipelineJsonBody,
    136
    137) -> Optional[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]:
    138    """List explainability configs for a given pipeline
    139
    140     Returns a list of explainability configs for the specified pipeline.
    141
    142    Args:
    143        json_body (ExplainabilityListConfigsByPipelineJsonBody):
    144
    145    Returns:
    146        Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]
    147    """
    148
    149
    150    return sync_detailed(
    151        client=client,
    152json_body=json_body,
    153
    154    ).parsed

List explainability configs for a given pipeline

Returns a list of explainability configs for the specified pipeline.

Args: json_body (ExplainabilityListConfigsByPipelineJsonBody):

Returns: Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]

async def asyncio_detailed( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_json_body.ExplainabilityListConfigsByPipelineJsonBody) -> wallaroo.wallaroo_ml_ops_api_client.types.Response[typing.Union[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_400.ExplainabilityListConfigsByPipelineResponse400, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_401.ExplainabilityListConfigsByPipelineResponse401, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_500.ExplainabilityListConfigsByPipelineResponse500, typing.List[typing.Optional[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_200_item.ExplainabilityListConfigsByPipelineResponse200Item]]]]: View Source

    156async def asyncio_detailed(
    157    *,
    158    client: Client,
    159    json_body: ExplainabilityListConfigsByPipelineJsonBody,
    160
    161) -> Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]:
    162    """List explainability configs for a given pipeline
    163
    164     Returns a list of explainability configs for the specified pipeline.
    165
    166    Args:
    167        json_body (ExplainabilityListConfigsByPipelineJsonBody):
    168
    169    Returns:
    170        Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]
    171    """
    172
    173
    174    kwargs = _get_kwargs(
    175        client=client,
    176json_body=json_body,
    177
    178    )
    179
    180    async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
    181        response = await _client.request(
    182            **kwargs
    183        )
    184
    185    return _build_response(response=response)

List explainability configs for a given pipeline

Returns a list of explainability configs for the specified pipeline.

Args: json_body (ExplainabilityListConfigsByPipelineJsonBody):

Returns: Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]

async def asyncio( *, client: wallaroo.wallaroo_ml_ops_api_client.client.Client, json_body: wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_json_body.ExplainabilityListConfigsByPipelineJsonBody) -> Union[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_400.ExplainabilityListConfigsByPipelineResponse400, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_401.ExplainabilityListConfigsByPipelineResponse401, wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_500.ExplainabilityListConfigsByPipelineResponse500, List[Optional[wallaroo.wallaroo_ml_ops_api_client.models.explainability_list_configs_by_pipeline_response_200_item.ExplainabilityListConfigsByPipelineResponse200Item]], NoneType]: View Source

    187async def asyncio(
    188    *,
    189    client: Client,
    190    json_body: ExplainabilityListConfigsByPipelineJsonBody,
    191
    192) -> Optional[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]:
    193    """List explainability configs for a given pipeline
    194
    195     Returns a list of explainability configs for the specified pipeline.
    196
    197    Args:
    198        json_body (ExplainabilityListConfigsByPipelineJsonBody):
    199
    200    Returns:
    201        Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]
    202    """
    203
    204
    205    return (await asyncio_detailed(
    206        client=client,
    207json_body=json_body,
    208
    209    )).parsed

List explainability configs for a given pipeline

Returns a list of explainability configs for the specified pipeline.

Args: json_body (ExplainabilityListConfigsByPipelineJsonBody):

Returns: Response[Union[ExplainabilityListConfigsByPipelineResponse400, ExplainabilityListConfigsByPipelineResponse401, ExplainabilityListConfigsByPipelineResponse500, List[Optional[ExplainabilityListConfigsByPipelineResponse200Item]]]]