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

Remove Duplicated Strip Projects Code from SDKs #820

Merged
merged 23 commits into from
Jun 25, 2020
Merged

Remove Duplicated Strip Projects Code from SDKs #820

merged 23 commits into from
Jun 25, 2020

Conversation

mrzzy
Copy link
Collaborator

@mrzzy mrzzy commented Jun 23, 2020

What this PR does / why we need it:

Problem

Continuation of: #693.

In v0.5 SDK, projects stripped from string Feature References in individual SDKs. This is a source of code duplication as the same strip project code is implemented and re implemented in the 3 SDKs. This duplication makes maintenance difficult as we have to maintain the same logic in all 3 SDKs.

What does the PR do

  • Add project to GetOnlineFeaturesRequest as optional field in ServingService.proto.
    • When the user specifies the project with project name, Serving get online features from the specified project.
    • The GetOnlineFeaturesRequest's project field will take precedence over project specified in FeatureReferences if both are specified.
  • Update the new v0.6 SDK to use GetOnlineFeatureRequest's project field.
  • Remove for v0.6 Strip projects code inf SDKs.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

Added project field to GetOnlineFeaturesRequest in ServingService proto to override project in request.

@mrzzy mrzzy changed the title Remove Duplicated Strip Projects Code from SDKs. Remove Duplicated Strip Projects Code from SDKs Jun 23, 2020
mrzzy added 18 commits June 24, 2020 15:08
…e feature set

Caused by passing entire get online request in unpackValueMap(), when in
fact it should have been individual featureSetRequests. Caused features
that was not in the first feature row to be nulled out.
String.format("Unsupported feature reference: %s", featureRefString));
}
throw new IllegalArgumentException(
String.format("Unsupported feature reference: %s", featureRefString));
Copy link
Member

Choose a reason for hiding this comment

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

Can we be more specific with this exception?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Corrected.

});
return featureSetRequests;
}

/** Build a Feature Set request from the Feature Set specified by name and Feature References */
Copy link
Member

Choose a reason for hiding this comment

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

A full Javadoc comment would be nice.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Corrected.

FeatureSetSpec featureSetSpec;
try {
featureSetSpec = featureSetCache.get(featureSetName);
} catch (ExecutionException e) {
Copy link
Member

Choose a reason for hiding this comment

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

One of the major pain point that I have seen is when users are requesting features that dont exist because a store is not subscribed to it. It maybe out of scope for this PR, but is there a way that we can address that problem?

Basically they should get an exception that a feature set exists but is not being populated, instead of just "this feature or feature set doesnt exist".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think one way we can resolve this populate the feature set cache from core wholesale and apply the subscription checking only when request is made. This way we be able to determine if the request is rejected due missing feature set or because subscription was not applied properly.

@woop
Copy link
Member

woop commented Jun 25, 2020

/lgtm

@mrzzy
Copy link
Collaborator Author

mrzzy commented Jun 25, 2020

/test test-end-to-end-batch

1 similar comment
@mrzzy
Copy link
Collaborator Author

mrzzy commented Jun 25, 2020

/test test-end-to-end-batch

@woop
Copy link
Member

woop commented Jun 25, 2020

/lgtm

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrzzy, woop

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@feast-ci-bot feast-ci-bot merged commit 7db6ad6 into feast-dev:master Jun 25, 2020
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.

3 participants