Skip to content

Commit

Permalink
fix(sdk): change Union[int, str] to object.
Browse files Browse the repository at this point in the history
Signed-off-by: Electronic-Waste <[email protected]>
  • Loading branch information
Electronic-Waste committed Mar 1, 2025
1 parent c3773b3 commit 2aff571
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion sdk/docs/TrainerV1alpha1TorchMLPolicySource.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ TorchMLPolicySource represents a PyTorch runtime configuration.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**elastic_policy** | [**TrainerV1alpha1TorchElasticPolicy**](TrainerV1alpha1TorchElasticPolicy.md) | | [optional]
**num_proc_per_node** | [**Union[int, str]**](K8sIoApimachineryPkgUtilIntstrIntOrString.md) | | [optional]
**num_proc_per_node** | [**object**](K8sIoApimachineryPkgUtilIntstrIntOrString.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 1 addition & 1 deletion sdk/docs/TrainerV1alpha1Trainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Name | Type | Description | Notes
**env** | [**list[V1EnvVar]**](V1EnvVar.md) | List of environment variables to set in the training container. These values will be merged with the TrainingRuntime&#39;s trainer environments. | [optional]
**image** | **str** | Docker image for the training container. | [optional]
**num_nodes** | **int** | Number of training nodes. | [optional]
**num_proc_per_node** | [**Union[int, str]**](K8sIoApimachineryPkgUtilIntstrIntOrString.md) | | [optional]
**num_proc_per_node** | [**object**](K8sIoApimachineryPkgUtilIntstrIntOrString.md) | | [optional]
**resources_per_node** | [**V1ResourceRequirements**](V1ResourceRequirements.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TrainerV1alpha1TorchMLPolicySource(object):
"""
openapi_types = {
'elastic_policy': 'TrainerV1alpha1TorchElasticPolicy',
'num_proc_per_node': 'Union[int, str]'
'num_proc_per_node': 'object'
}

attribute_map = {
Expand Down Expand Up @@ -84,7 +84,7 @@ def num_proc_per_node(self):
:return: The num_proc_per_node of this TrainerV1alpha1TorchMLPolicySource. # noqa: E501
:rtype: Union[int, str]
:rtype: object
"""
return self._num_proc_per_node

Expand All @@ -94,7 +94,7 @@ def num_proc_per_node(self, num_proc_per_node):
:param num_proc_per_node: The num_proc_per_node of this TrainerV1alpha1TorchMLPolicySource. # noqa: E501
:type: Union[int, str]
:type: object
"""

self._num_proc_per_node = num_proc_per_node
Expand Down
6 changes: 3 additions & 3 deletions sdk/kubeflow/trainer/models/trainer_v1alpha1_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TrainerV1alpha1Trainer(object):
'env': 'list[V1EnvVar]',
'image': 'str',
'num_nodes': 'int',
'num_proc_per_node': 'Union[int, str]',
'num_proc_per_node': 'object',
'resources_per_node': 'V1ResourceRequirements'
}

Expand Down Expand Up @@ -203,7 +203,7 @@ def num_proc_per_node(self):
:return: The num_proc_per_node of this TrainerV1alpha1Trainer. # noqa: E501
:rtype: Union[int, str]
:rtype: object
"""
return self._num_proc_per_node

Expand All @@ -213,7 +213,7 @@ def num_proc_per_node(self, num_proc_per_node):
:param num_proc_per_node: The num_proc_per_node of this TrainerV1alpha1Trainer. # noqa: E501
:type: Union[int, str]
:type: object
"""

self._num_proc_per_node = num_proc_per_node
Expand Down

0 comments on commit 2aff571

Please sign in to comment.