Skip to content

[SDK] grpc-related bugs in Python SDK #2395

@Electronic-Waste

Description

@Electronic-Waste

What happened?

image

image

When I called report_metrics in the SDK built by myself, the first error above occurred.

After I modified grpc.beta.implementations.insecure_channel to grpc.insecure_channel, the second error above occurred.

What did you expect to happen?

After PR #2344 was merged to the main branch, beta_create_DBManager_stub was removed in api_pb2.py. But we did not make changes in the following part of codes so that the first error occurred

with katib_api_pb2.beta_create_DBManager_stub(channel) as client:
try:
# When metric name is empty, we select all logs from the Katib DB.
observation_logs = client.GetObservationLog(
katib_api_pb2.GetObservationLogRequest(trial_name=name),
timeout=timeout,
)

with katib_api_pb2.beta_create_DBManager_stub(channel) as client:
try:
timestamp = datetime.now(timezone.utc).strftime(constants.RFC3339_FORMAT)
client.ReportObservationLog(

Also grpcio package after 1.0.0 has removed beta version. Sometimes we may get errors when we use beta version.

channel = grpc.beta.implementations.insecure_channel(
db_manager_address[0], int(db_manager_address[1])
)

channel = grpc.beta.implementations.insecure_channel(
db_manager_address[0], int(db_manager_address[1])
)

I think we need to may some changes to Python SDK. WDYT👀 @andreyvelich @tenzen-y @johnugeorge

Environment

Kubernetes version:

Client Version: v1.30.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.1

Katib controller version:

Built by myself

Katib Python SDK version:

(Also built by myself)
Name: kubeflow-katib
Version: 0.17.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: [email protected]
License: Apache License Version 2.0
Location: /home/xxx/.local/lib/python3.10/site-packages/kubeflow_katib-0.17.0-py3.10.egg
Requires: certifi, grpcio, kubernetes, protobuf, setuptools, six, urllib3
Required-by: 

Impacted by this bug?

Give it a 👍 We prioritize the issues with most 👍

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions