https://github.com/googleapis/python-aiplatform/blob/a94d79a922afdb6612889c652d45ddd4f2c10c2f/google/cloud/aiplatform_v1beta1/types/endpoint.py#L31-L102
traffic_split is a proto.MapField but the type annotation indicates it is a sequence. I think Mapping[str, int] is what this field behaves like in practice.
Note that there's no TrafficSplitEntry type in the library, so the existing type is misleading.
traffic_split (Sequence[~.endpoint.Endpoint.TrafficSplitEntry]):
A map from a DeployedModel's ID to the
percentage of this Endpoint's traffic that
should be forwarded to that DeployedModel.
If a DeployedModel's ID is not listed in this
map, then it receives no traffic.
The traffic percentage values must add up to
100, or map must be empty if the Endpoint is to
not accept any traffic at a moment.
traffic_split = proto.MapField(proto.STRING, proto.INT32, number=5)
CC @sirtorry
https://github.com/googleapis/python-aiplatform/blob/a94d79a922afdb6612889c652d45ddd4f2c10c2f/google/cloud/aiplatform_v1beta1/types/endpoint.py#L31-L102
traffic_splitis aproto.MapFieldbut the type annotation indicates it is a sequence. I thinkMapping[str, int]is what this field behaves like in practice.Note that there's no
TrafficSplitEntrytype in the library, so the existing type is misleading.CC @sirtorry