Class AffinityPolicy

Applicability

Product

Supported

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

x

Function Description

Defines the affinity policy enumeration.

Prototype

NO_AFFINITY = (fw.AffinityPolicy.NO_AFFINITY)         # No affinity required
ROW_AFFINITY = (fw.AffinityPolicy.ROW_AFFINITY)   # Row affinity, that is, data in the same row is routed to the same node.
COL_AFFINITY = (fw.AffinityPolicy.COL_AFFINITY)      # Column affinity, that is, data in the same column is routed to the same node.
def __init__(self, inner_type):
    self.inner_type = inner_type

Note: The row affinity and column affinity policies are used only for setting BalanceConfig to implement balanced distribution. For details about the row affinity usage example, see Multi-Instance Deployment.

Parameters

None

Returns

None

Exception Handling

None

Constraints

None