◐ Shell
reader mode source ↗
Skip to content

feat: Make udf optional if agg defined (#5689)#6328

Merged
nquinn408 merged 6 commits into
feast-dev:masterfrom
nquinn408:optional-udf-if-agg
Apr 25, 2026
Merged

feat: Make udf optional if agg defined (#5689)#6328
nquinn408 merged 6 commits into
feast-dev:masterfrom
nquinn408:optional-udf-if-agg

Conversation

@nquinn408

@nquinn408 nquinn408 commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

@nquinn408 nquinn408 self-assigned this Apr 24, 2026
@nquinn408 nquinn408 requested a review from a team as a code owner April 24, 2026 20:10
devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: Nick Quinn <nicholas_quinn@apple.com>
@nquinn408 nquinn408 force-pushed the optional-udf-if-agg branch from 16ebe3a to 0524b4d Compare April 24, 2026 21:11
Fixes ruff I001 import ordering violation introduced with the
aggregations-without-udf test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Nick Quinn <nicholas_quinn@apple.com>
@nquinn408 nquinn408 force-pushed the optional-udf-if-agg branch from 0524b4d to f64c1cb Compare April 24, 2026 21:11
nickquinn408 and others added 4 commits April 24, 2026 14:13
_parse_transformation_from_proto fell through to _handle_backward_compatible_udf
when feature_transformation was absent, crashing on dill.loads(b"") for ODFVs
that have no transformation but do have aggregations.

Return None early when transformation_type is None and proto.spec.aggregations
is non-empty.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Nick Quinn <nicholas_quinn@apple.com>
infer_features() unconditionally asserted feature_transformation is not
None, crashing during apply() for aggregation-only ODFVs. Add an early
return when aggregations are present and feature_transformation is None;
features are explicitly declared via schema so inference via transformation
execution is not needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Nick Quinn <nicholas_quinn@apple.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Nick Quinn <nicholas_quinn@apple.com>
- Redirect feast.types.Value_pb2 stub imports to
  feast.protos.feast.types.Value_pb2 where typed .pyi stubs live
- Add # type: ignore[arg-type] where .value (int) is passed to a
  proto field typed as NewType("ValueType", int)
- Add # type: ignore[arg-type] for getattr call with Optional[str]
  from WhichOneof in remote.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Nick Quinn <nicholas_quinn@apple.com>
@nquinn408 nquinn408 force-pushed the optional-udf-if-agg branch from bb086b5 to c7838e6 Compare April 24, 2026 23:55

@HaoXuAI HaoXuAI left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

LGTM!

@ntkathole

Copy link
Copy Markdown
Member

also, docstring change for aggregation or docs addition for the change - https://github.com/feast-dev/feast/blob/master/sdk/python/feast/on_demand_feature_view.py#L211

Hide details View details @nquinn408 nquinn408 merged commit f630056 into feast-dev:master Apr 25, 2026
43 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants