Skip to content

Commit

Permalink
Fix OnDemandFeatureView type inference for array types
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Mirrington <[email protected]>
  • Loading branch information
alexmirrington committed Jun 24, 2024
1 parent de5b0eb commit feac39c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sdk/python/feast/transformation/pandas_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def infer_features(self, random_input: dict[str, list[Any]]) -> list[Field]:
Field(
name=f,
dtype=from_value_type(
python_type_to_feast_value_type(f, type_name=str(dt))
python_type_to_feast_value_type(f, value=output_df[f].tolist()[0], type_name=str(dt))
),
)
for f, dt in zip(output_df.columns, output_df.dtypes)
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/transformation/python_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def infer_features(self, random_input: dict[str, list[Any]]) -> list[Field]:
Field(
name=f,
dtype=from_value_type(
python_type_to_feast_value_type(f, type_name=type(dt[0]).__name__)
python_type_to_feast_value_type(f, value=dt[0], type_name=type(dt[0]).__name__)
),
)
for f, dt in output_dict.items()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def infer_features(self, random_input: dict[str, list[Any]]) -> list[Field]:
Field(
name=f,
dtype=from_value_type(
python_type_to_feast_value_type(f, type_name=str(dt))
python_type_to_feast_value_type(f, value=output_df[f].tolist()[0], type_name=str(dt))
),
)
for f, dt in zip(output_df.columns, output_df.dtypes)
Expand Down

0 comments on commit feac39c

Please sign in to comment.