-
Notifications
You must be signed in to change notification settings - Fork 510
Open
Description
What happened?
The Python SDK helper function katib.search.categorical() incorrectly constructs V1beta1FeasibleSpace by passing the categorical values as positional argument.
def categorical(list: List):
"""Sample a categorical value from the `list`.
Args:
list: List of categorical values.
"""
return models.V1beta1ParameterSpec(
parameter_type="categorical",
feasible_space=models.V1beta1FeasibleSpace(list),
)
Passing list as positional argument to V1beta1FeasibleSpace, it is assigned to the distribution field instead of the list field. This results in a wrong generated JSON:
l = ["a", "b"]
katib.search.categorical(l)
{'feasible_space': {'distribution': ['a', 'b'],
'list': None,
'max': None,
'min': None,
'step': None},
'name': None,
'parameter_type': 'categorical'}
The admission webhook rejects the experiment.
What did you expect to happen?
katib.search.categorical() should construct V1beta1FeasibleSpace using positional argument list=list resulting in:
l = ["a", "b"]
katib.search.categorical(l)
{'feasible_space': {'distribution': None,
'list': ['a', 'b'],
'max': None,
'min': None,
'step': None},
'name': None,
'parameter_type': 'categorical'}
Environment
Kubernetes version:
$ kubectl version
Client Version: v1.35.0
Kustomize Version: v5.7.1
Server Version: v1.35.0Katib controller version:
$ kubectl get pods -n kubeflow -l katib.kubeflow.org/component=controller -o jsonpath="{.items[*].spec.containers[*].image}"
ghcr.io/kubeflow/katib/katib-controller:v0.19.0Katib Python SDK version:
$ pip show kubeflow-katib
Name: kubeflow-katib
Version: 0.19.0
Summary: Katib Python SDK for APIVersion v1beta1
Home-page: https://github.com/kubeflow/katib/tree/master/sdk/python/v1beta1
Author: Kubeflow Authors
Author-email: premnath.vel@gmail.com
License: Apache License Version 2.0
Location: C:\Users\dorazioel\Desktop\kubeflow\.venv\Lib\site-packages
Requires: certifi, grpcio, kubeflow-training, kubernetes, protobuf, setuptools, six, urllib3
Required-by:Impacted by this bug?
Give it a π We prioritize the issues with most π
Reactions are currently unavailable