-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Validate feature reference and project functionality #631
Comments
Relevant #453 |
Proposed changes to support this: Protobuf
Feast Core
Feast Serving
Feast Go SDK
Feast Java SDK
Feast Python SDK
|
I have renumbered the tasks so that it's easier to address them individually.
Where is the default project configured (or hardcoded?) Thanks for taking the effort @mrzzy. You've been very detailed. |
I think this should be a separate transform as it has nothing to Kafka. An inline transform would add little boilerplate if that is a concern: PCollection<FeatureRow> featureRows = featureRows.apply("ApplyDefaultProject",
ParDo.of(new DoFn<FeatureRow, FeatureRow>() {
@ProcessElement
public void processElement(ProcessContext context) {
FeatureRow featureRow = context.element();
// if project is unset, polyfill default project
// ... polyfill.
}
} This would be added directly to to
The default project is:
|
Ok, looks good to me. |
Additional changes are required that was not in the original list of proposed changes to the serving if we want to allow Serving to be able to serve features with names that can be duplicated across a project, but unique across a feature set. Specifically if we want to support this in serving, we have to add a Feature Set name to Feature References in serving: message FeatureReference {
string project = 1;
string feature_set_name = 5;
string name = 2;
int32 version = 3;
google.protobuf.Duration max_age = 4;
} We can continue clients that do not specify
String feature references would be accepted in the following formats:
Where a unspecified:
|
LGTM. |
With that said, should the first several cases @mrzzy listed as accepted actually not be?
Is it planned for v0.5 to be a grace period of backward compatibility for migrating these, or it's something intended to swallow the breakage now? The migration plan from v0.4 for retrieval in the breaking case would be for users to update their calls to not include project, and possibly qualify by feature set instead if necessary, before the Feast upgrade—does that cover it? Would it then be forward compatible for old SDK? Also I guess requests that use multiple projects would need to be changed to multiple requests. Possibly a way to transition if desired could be to accept projects in the refs, return an error if more than one project is used in a request, then translate the requests internally into refs with their project removed and the one validated project set at the request level overriding the default project. New SDK could even do this client-side perhaps. That might enable marking the
Should |
I think they should be accepted for the time being at the Feast Serving layer. However, at the SDK level we want to remove that option. That would allow old clients to continue to work with a new serving, but provides encouragement to move to a single
Yea, we are moving all of our production feature sets into a single default project, and asking users to not define the project in feature refs. For teams that can't do this, the pathological case is selecting features in different projects with the same name. That would result in an exception. Leaning to softly supporting multiple projects in requests if they are explicitly defined, but I am also open to raising an exception in that case. Ideally we would move to a single project definition.
Not 100% clear what you mean here. What is the I do like the gist of what you are saying and I think its important that we capture all these decisions publicly. |
We will still allow project to be specified in feature references for backward compatibility with older SDKs/clients, as @woop has discussed.
This makes sense to add so that we can centralize the effect of setting the project explicit in a separate field in My understanding of how this effect should work currently is to allow projects to still be specified in feature references as usual. However if the project is specified in a explicitly in a separate field, that takes precedence and overrides the projects set in feature references (if set).
If we where to throw an error here, this would constitute a breaking change to old client/SDKs as there were no limitations on cross projects feature references before this.
This make sense to setup deprecation notices on
This should not create any breaking changes as we are moving from a Project name spaced features in v0.4 which have project-wide unique names. |
The server. I'll try to clarify: if an old client sends a retrieval request for these references:
Then, server side at the edge RPC controller layer (this could even be an interceptor):
By "validated" I meant returning an error if the above case had two different projects in the request. This is TBD, it will break some old client calls but would allow more aggressively removing project from refs for internal implementation now. New SDK could do this request translation client-side, raising an exception if there are > 1 projects, so it's likely to be caught in testing and QA, and could emit deprecation warnings in Java if the |
I don't have a dog in this fight since we don't have projects being used in retrieval requests, but I've been insistent before about not breaking Serving. This scenario is possibly different, because if I'm seeing it accurately, there is a migration path for old clients, but it requires human coordination to:
I can't say whether that's practically feasible for everyone, or how much the tradeoff is worth in Feast maintenance complexity saved for code path and data model duplicity, if you maintain total backward compatibility for the release. |
Yip, agree with this approach. Especially since it's an uncommon pattern for most teams afaik.
I like this.
I'd optimize for moving faster since we still have a lot of ground to cover. The fact that there is an upgrade path here does mean that it's an easier pill to swallow, as long as its clearly documented. |
The PR description edit became considerably harder to follow than #479 (comment) – that may be necessary to some extent if we've yielded more concession to backward compatibility than initially planned, but I think it'd help to break it down by milestones, keeping the more forceful specification tone, asserting deprecations and when they will be removed. As a possible example, instead of:
Maybe something like:
I'm not sure whether @woop's original "there should be a single key on each Feast client to set the project" meant it applies to the whole client instance for its lifecycle, or per-request, so my "request-level" part might be wrong. Not sure if it'd actually be v0.6 either since it's meant to come close on the heels of v0.5, but just illustration. |
From the user's perspective. I am happy with our current approach of having the project within the feature reference temporarily. So this should maybe be clarified.
I'd like to sneak it into 0.6, but it wouldn't be a train smash if it got held up. |
This card is a follow up on #479, and specifically this comment
The goal is to add tests and/or the functionality referenced in the above comment.
Feature references cannot contain a project when it is in string form. This is to prevent multiple projects from being selected in a single feature request (for retrieval).feature_set_name
is used to reference a feature when a single feature name is ambiguous.Projects can only be defined once per incoming request. There should be a single key on each Feast client to set the project, since projects aren't defined in the feature reference any more.project
to allow users to override projects for all given feature references. Moving forward this would be the preferred way to set projects, not in feature references, although that is still accepted for backwards compatibility.The text was updated successfully, but these errors were encountered: