fix: make TablesClient.predict permissive to input data types (#13)
fix: make TablesClient.predict permissive to input data types (#13)

* fix: make TablesClient.predict permissive to input data types

The current implementation checks input instance's data type according
to column spec's data type. E.g., if the column spec is float, it
requires the input to be float or int, but not string. However, this
is not the same as tables API contract:

   float column data type could be string or number values.

The current code raises exception with error messages like

    TypeError: '0' has type str, but expected one of: int, long, float
    when passed in a string value for numeric columns, which should be
    allowed.

This PR changes the logic so that Python SDK side will be permissive
for the input data type - basically all JSON compatible data types are
allow. And rely on backend for the validation.

* Fix according to comment.

* Fix lint.

* Address comment: use elif instead of if

Co-authored-by: Helin Wang <73f279daa407454dadaca7441b98e296e4c05f65@google.com>
googleapis/python-automl,googleapis/python-automl