File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
sdk/python/v1beta1/kubeflow/katib/api Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ def tune(
147
147
retain_trials : bool = False ,
148
148
packages_to_install : List [str ] = None ,
149
149
pip_index_url : str = "https://pypi.org/simple" ,
150
+ resources : Optional [client .V1ResourceRequirements ] = None ,
150
151
):
151
152
"""Create HyperParameter Tuning Katib Experiment from the objective function.
152
153
@@ -182,6 +183,9 @@ def tune(
182
183
to the base image packages. These packages are installed before
183
184
executing the objective function.
184
185
pip_index_url: The PyPI url from which to install Python packages.
186
+ resources: An optional kubernetes.client.V1ResourceRequirements object that lets
187
+ you manually specify cpu and memory limits and requests for the trial container.
188
+ Additional details are available at https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ResourceRequirements.md.
185
189
186
190
Raises:
187
191
ValueError: Objective function has invalid arguments.
@@ -297,6 +301,7 @@ def tune(
297
301
image = base_image ,
298
302
command = ["bash" , "-c" ],
299
303
args = [exec_script ],
304
+ resources = resources ,
300
305
)
301
306
],
302
307
),
You can’t perform that action at this time.
0 commit comments