Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for singleton Dictionary execution for on demand feature views #4075

Open
franciscojavierarceo opened this issue Apr 4, 2024 · 0 comments
Assignees
Labels
kind/feature New feature or request

Comments

@franciscojavierarceo
Copy link
Member

Is your feature request related to a problem? Please describe.
Support for Python Native transformations was recently released (#4069) but it expects a type = Dict[str, List[Any]]. Feast should support Dict[str, Any] where Any could be a singleton.

Describe the solution you'd like
We should be able to run on demand feature views like so:

@on_demand_feature_view(
    sources=[driver_stats_fv[["conv_rate", "acc_rate"]]],
    schema=[
        Field(name="conv_rate_plus_acc_python_singleton", dtype=Float64)
    ],
    mode="python",
)
def python_singleton_view(inputs: Dict[str, Any]) -> Dict[str, Any]:
    output: Dict[str, Any] = dict(conv_rate_plus_acc_python=float("-inf"))
    output["conv_rate_plus_acc_python_singleton"] = (
        inputs["conv_rate"] + inputs["acc_rate"]
    )
    return output

Currently, this feature view result in a type error.

Describe alternatives you've considered
N/A

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant