diff --git a/sdk/python/v1beta1/kubeflow/katib/api/katib_client.py b/sdk/python/v1beta1/kubeflow/katib/api/katib_client.py index 0929303cff9..e7ea13eb0ff 100644 --- a/sdk/python/v1beta1/kubeflow/katib/api/katib_client.py +++ b/sdk/python/v1beta1/kubeflow/katib/api/katib_client.py @@ -147,6 +147,7 @@ def tune( retain_trials: bool = False, packages_to_install: List[str] = None, pip_index_url: str = "https://pypi.org/simple", + resources: Optional[client.V1ResourceRequirements] = None, ): """Create HyperParameter Tuning Katib Experiment from the objective function. @@ -182,6 +183,9 @@ def tune( to the base image packages. These packages are installed before executing the objective function. pip_index_url: The PyPI url from which to install Python packages. + resources: An optional kubernetes.client.V1ResourceRequirements object that lets + you manully specify cpu and memory limits and requests for the trial container. + Additional details are available at https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ResourceRequirements.md. Raises: ValueError: Objective function has invalid arguments. @@ -297,6 +301,7 @@ def tune( image=base_image, command=["bash", "-c"], args=[exec_script], + resources=resources, ) ], ),