You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Writing to a singleton Python ODFV with write_to_online_store=True fails for scalar outputs and filtered dataframes #7204
store.write_to_online_store(...) (and push with transform_on_write) for an on demand feature view with mode="python", singleton=True and write_to_online_store=True runs the UDF once per input row and writes the result for every row. #7151 fixed the same first-row-only behaviour for online reads; this is the write side.
Current behavior
FeatureStore._transform_on_demand_feature_view_df keeps the first UDF output as-is and appends the later outputs to it:
A UDF that returns scalars (the UDF shape of the singleton example in docs/reference/beta-on-demand-feature-view.md, there used at read time) fails on every write. One row raises ValueError: If using all scalar values, you must pass an index; two or more rows raise AttributeError: 'float' object has no attribute 'append'.
The first row is chosen by index label (if i == 0), so a filtered dataframe whose index does not contain 0 raises TypeError: list indices must be integers or slices, not str, even for UDFs that return lists (the docling/PDF chunking pattern).
Input columns are taken from the first input row only (df.to_dict(orient="records")[0]), and dropped entirely when the UDF returns more than one row.
Activity