Skip to content

Commit feac39c

Browse files
Fix OnDemandFeatureView type inference for array types
Signed-off-by: Alex Mirrington <alex.mirrington@rokt.com>
1 parent de5b0eb commit feac39c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

sdk/python/feast/transformation/pandas_transformation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def infer_features(self, random_input: dict[str, list[Any]]) -> list[Field]:
4444
Field(
4545
name=f,
4646
dtype=from_value_type(
47-
python_type_to_feast_value_type(f, type_name=str(dt))
47+
python_type_to_feast_value_type(f, value=output_df[f].tolist()[0], type_name=str(dt))
4848
),
4949
)
5050
for f, dt in zip(output_df.columns, output_df.dtypes)

sdk/python/feast/transformation/python_transformation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def infer_features(self, random_input: dict[str, list[Any]]) -> list[Field]:
4444
Field(
4545
name=f,
4646
dtype=from_value_type(
47-
python_type_to_feast_value_type(f, type_name=type(dt[0]).__name__)
47+
python_type_to_feast_value_type(f, value=dt[0], type_name=type(dt[0]).__name__)
4848
),
4949
)
5050
for f, dt in output_dict.items()

sdk/python/feast/transformation/substrait_transformation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def infer_features(self, random_input: dict[str, list[Any]]) -> list[Field]:
6464
Field(
6565
name=f,
6666
dtype=from_value_type(
67-
python_type_to_feast_value_type(f, type_name=str(dt))
67+
python_type_to_feast_value_type(f, value=output_df[f].tolist()[0], type_name=str(dt))
6868
),
6969
)
7070
for f, dt in zip(output_df.columns, output_df.dtypes)

0 commit comments

Comments
 (0)