Skip to content

TablesClient: predict does not work with Python list or dictionary #9887

@helinwang

Description

@helinwang

The problematic line is at:

elif type_code == data_types_pb2.ARRAY:
return {"list_value": value}
elif type_code == data_types_pb2.STRUCT:
return {"struct_value": value}

The expected type of the array/struct is google.protobuf.ListValue/google.protobuf.StructValue, not Python list/dictionary.

The failure message is:

*** TypeError: Parameter to MergeFrom() must be instance of same class: expect ed google.protobuf.ListValue got list.

Preferably we should only support Python list/dictionary. Now for backwards compatibility, we should support list/dictionary/google.protobuf.ListValue/google.protobuf.StructValue

Metadata

Metadata

Assignees

Labels

api: automlIssues related to the AutoML API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions