Skip to content

can't /push (inferred) integers to a float feature #3884

@robhowley

Description

@robhowley

Expected Behavior

Attempts to /push the following data

{
  "df": {
    "feature_one": [123, 456]
  }
}

to the online store where the feature view field is Field("feature_one", dtype=types.Float64) should succeed.

Current Behavior

This fails with the following error.

image

Possible Solution

The PYTHON_SCALAR_VALUE_TYPE_TO_PROTO_VALUE map defined here states that value types of FLOAT have to be inferred as either np.float or float. Add int and np.int_ to the list and it works as expected.

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