Skip to main content

ParseElasticConfig

Parses an ElasticConfig object and converts it into a kubeflowv1.ElasticPolicy object, extracting minimum replicas, maximum replicas, processes per node, maximum restarts, and RDZV backend settings.

def ParseElasticConfig(
elasticConfig: ElasticConfig
) - > *kubeflowv1.ElasticPolicy

Parses the provided ElasticConfig to create a Kubeflow ElasticPolicy object. This function is used to support parsing elastic configurations from both v0 and v1 of the Kubeflow PyTorch IDL.

Parameters​

NameTypeDescription
elasticConfigElasticConfigThe ElasticConfig object containing the desired elastic policy settings, which can be from either v0 or v1 of the Kubeflow PyTorch IDL.

Returns​

TypeDescription
*kubeflowv1.ElasticPolicyA pointer to a kubeflowv1.ElasticPolicy object, populated with values from the input ElasticConfig.