Skip to content

Update Feast Core list features method - #1176

Merged
feast-ci-bot merged 5 commits into
feast-dev:masterfrom
terryyylim:update-list-features
Nov 20, 2020
Merged

Update Feast Core list features method#1176
feast-ci-bot merged 5 commits into
feast-dev:masterfrom
terryyylim:update-list-features

Conversation

@terryyylim

Copy link
Copy Markdown
Member

What this PR does / why we need it:
Currently, listFeatures method is not updated to return features from feature tables, but rather feature sets.
This PR includes:

  • Updated ListFeaturesResponse proto
  • Updated SpecService to retrieve features from feature tables
  • Updated REST (GET) endpoint for listing features

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

Users can now retrieve features registered in feature tables.

Signed-off-by: Terence <terencelimxp@gmail.com>
Signed-off-by: Terence <terencelimxp@gmail.com>
@terryyylim

Copy link
Copy Markdown
Member Author

/retest

() -> apiClient.simpleGetFeatureTable(projectName, featureTableName));

assertThat(featureTables.size(), equalTo(0));
assertThat(featureTables.size(), equalTo(1));

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.

The test is called "should ReturnNoTables", isn't there contradiction?

Comment thread core/src/main/java/feast/core/model/FeatureTable.java
* @param features List of features to insert to map.
* @return Map of featureRef:feature.
*/
public Map<String, FeatureV2> getFeaturesRefToFeaturesMap(List<FeatureV2> features) {

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.

why this method is public? Seems that it's being only used by getFeaturesByRef

* @param featureReference to render as string
* @return string representation of feature reference.
*/
public static String renderFeatureRef(ServingAPIProto.FeatureReferenceV2 featureReference) {

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.

Do we need this method? It just wraps single function call

* @param labelsFilter contain labels that should be attached to FeatureTable's features
* @return Map of Feature references and Features
*/
public Map<String, FeatureV2> getFeaturesByRef(Map<String, String> labelsFilter) {

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.

Name is a little bit confusing. It looks more like getFeaturesByLabels

.build();
List<FeatureTableProto.FeatureTable> featureTables =
apiClient.simpleListFeatureTables(filter);
System.out.println(featureTables);

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.

debug?

Signed-off-by: Terence <terencelimxp@gmail.com>
Signed-off-by: Terence <terencelimxp@gmail.com>
Signed-off-by: Terence <terencelimxp@gmail.com>
@feast-ci-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pyalex, terryyylim

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

The pull request process is described here

Details 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

@pyalex

pyalex commented Nov 20, 2020

Copy link
Copy Markdown
Collaborator

/lgtm

@feast-ci-bot
feast-ci-bot merged commit 77a83fd into feast-dev:master Nov 20, 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