Skip to content

KatibClient().list_experiments/list_trials fails with RuntimeError #2110

@votti

Description

@votti

/kind bug

What steps did you take and what happened:
I tried to list the experiments/trials using the Katib Client:

from kubeflow.katib import KatibClient

client=KatibClient()

my_namespace="my-namespace"
client.list_experiments(namespace=my_namespace)
client.list_trials(namespace=my_namespace)

raises the error

~/miniconda3/envs/katib-exp/lib/python3.11/site-packages/kubeflow/katib/api_client.py in __deserialize_model(self, data, klass)
    657                     value = data[klass.attribute_map[attr]]
--> 658                     kwargs[attr] = self.__deserialize(value, attr_type)
...
--> 285             raise RuntimeError(
    286                 "There was a problem to get experiments in namespace {0}. Exception: \
    287           {1} ".format(namespace, e))

RuntimeError: There was a problem to get experiments in namespace my-namespace. Exception:           module 'kubeflow.katib.models' has no attribute 'V1ResourceRequirements' 

What did you expect to happen:
No error.

Anything else you would like to add:
I was able to temporarily fix this by patching the kubeflow.katib.models namespace:

import kubeflow.katib.models as models
from kubernetes import client as kclient
models.V1ResourceRequirements = kclient.V1ResourceRequirements

Environment:

  • Katib version (check the Katib controller image version): 
     python sdk: katib==0.14.0
     docker.io/kubeflowkatib/katib-controller:v0.14.0"
    
  • Kubernetes version: (kubectl version):
    
  • Client Version: v1.26.0
    
  • Kustomize Version: v4.5.7
    
  • Server Version: v1.23.14-gke.1800
    
  • OS (uname -a): Linux LAPTOP-SS9UALAT 4.19.128-microsoft-standard SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
    

Impacted by this bug? Give it a 👍 We prioritize the issues with the most 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions