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

docs: Adding language recommendation #4266

Merged
merged 6 commits into from
Jun 15, 2024
Merged

Conversation

franciscojavierarceo
Copy link
Member

@franciscojavierarceo franciscojavierarceo commented Jun 11, 2024

What this PR does / why we need it:

This PR adds documentation about why we recommend using Feast with a Python Microservice.

Which issue(s) this PR fixes:

#4266

Fixes

#4266

Signed-off-by: Francisco Javier Arceo <[email protected]>
@tokoko
Copy link
Collaborator

tokoko commented Jun 12, 2024

Here we go 😄 I'm obviously very conflicted about this. I think we might be conflating two points here:

  • Should I reimplement feature computation logic? - tbh, I think this is the part this text is addressing rather than serving language choice. I'm very much on board here, you shouldn't reimplement because of skew, effort and all the other reasons outlined in the doc. But if you manage to stick to Precomputation is the way religiously (i.e. you're not using odfvs), that also means that you have effectively decoupled computation from serving, so the discussion regarding reimplementation of features has no bearing to serving environment language choice anymore.

  • Should I run a feature server in something other than python? - If we disregard odfvs for a minute, this is more of an implementation/maintenance burden for us rather than a user. Of course, I'd also go with python at this point in time because I'm not sure others work at all, but if we make them work and if we reimplement online store retrieval logic for most of online store implementations in java/go, there's really no reason why someone shouldn't switch to them (other than odfvs).

    Executing ODFVs written in python in a non-python serving environment is admittedly very tricky, but also something that's on us to solve, not on the user. If we manage to find good ways to do it w/o requiring reimplementation (by optimizing transformation server, making arrow-based go-python interop work or by somehow leveraging substrait), that also becomes a non-issue for the user.

@franciscojavierarceo
Copy link
Member Author

So in my last role I used ODFVs to create features and then persisted that output to a regular FV.

This a simple hack to allow us to launch what we needed faster but the real solution is to enable FVs to have feature computations equivalent to how ODFVs work with the Python mode.

The point is that feature transformations (i.e., precomputation) should happen in Python as well. ODFV will still need to support some light weight calculations (e.g., date differences from datetime.now()).

Let me in how what you think and thanks for the feedback! I can definitely incorporate this feedback in.

@tokoko
Copy link
Collaborator

tokoko commented Jun 12, 2024

You're referring to BatchFeatureView concept, right? (in tecton lingo, we still have to implement an alternative) I think I agree there, When implemented, BatchFeatureViews should only support python as far as feast is concerned. Having said that, we should also keep supporting externally computed features with normal FeatureView objects (Feature Table in tecton lingo). Those externally computed features might or might not be written in python, of course, we don't really have any say over there. I don't think we disagree there, just wanted to stress that none of this (except odfvs) has any bearing to the serving environment.

@franciscojavierarceo
Copy link
Member Author

yeah agreed with that. I'll clarify this in the doc more and I'll cut a PR to support Feature Transformations in regular feature views

Java and Go Clients are also available for online feature retrieval.
Java and Go Clients are also available for online feature retrieval.

In general, we recommend [using Python](language.md) for your Feature Store microservice.
Copy link
Contributor

Choose a reason for hiding this comment

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

The problem I see with this recommendation is online feature retrieval latency. Python has high latencies compared to Go or Java option. Do you think its better to mention the latency impact?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to address this point in this statement:

Precomputing features is the recommended optimal path to ensure low latency performance. Reducing feature serving to a lightweight database lookup is the ideal pattern, which means the marginal overhead of Python should be tolerable.

But I can be more explicit.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That definitely should be a factor. Even if you precompute, there will be applications out there with low-latency requirements and high enough load for which python server performance itself might become a bottleneck. I guess we are sort of trying to address that with introducing asyncio in python online retrieval, but even that might not be enough for some use cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

While that is true in theory, in practice Python works very well at quite high scale so my goal is to make it clear that we recommend Python.

Regardless, I see that this is in the overview section so I'll add this snippet in it.

@franciscojavierarceo franciscojavierarceo enabled auto-merge (squash) June 15, 2024 09:49
@franciscojavierarceo franciscojavierarceo merged commit ae4fc6c into master Jun 15, 2024
17 checks passed
@tokoko tokoko deleted the use-python branch July 16, 2024 12:08
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.

5 participants