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

Introducing list types for feast features retrieval #212

Merged
merged 6 commits into from
Feb 26, 2022

Conversation

ariefrahmansyah
Copy link
Contributor

@ariefrahmansyah ariefrahmansyah commented Jan 28, 2022

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:


Checklist

  • Added unit test, integration, and/or e2e tests
  • Tested locally
  • Updated documentation
  • Update Swagger spec if the PR introduce API changes
  • Regenerated Golang and Python client if the PR introduce API changes

@ariefrahmansyah ariefrahmansyah marked this pull request as ready for review February 25, 2022 03:12
mockFeasts: []mockFeast{
{
request: &feastSdk.OnlineFeaturesRequest{
Project: "default", // used as identifier for mocking. must match config
Copy link
Member

Choose a reason for hiding this comment

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

Since we don't assert the request to feast, have you make sure it's as expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I manually checked it by logging the request here: https://github.com/gojek/merlin/pull/212/files/c9656a225bb7b0d9c3f59bac6f00d8be7c7c4686#diff-744e4800800a7662f4f3e134e1885cbd4571a9f3a802bbedeab46cf168251fe0R777

I don't like this approach though, we should be able to verify the request to the feast.

@pradithya
Copy link
Member

LGTM, this is awesome!!
Even better, if you can improve the assertion of request being sent to Feast (#212 (comment))

@@ -367,7 +367,7 @@ func broadcastScalar(colMap map[string]interface{}, length int) map[string]inter
continue
}

val = colValueVal.Index(0)
val = colValueVal.Index(0).Interface()
Copy link
Collaborator

Choose a reason for hiding this comment

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

why change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because, when creating series of list elements, colValueVal.Index(0) returns reflect.Value instead of interface{}. So when we pass these reflect.Value to NewInferType to create the series, it will use wrong series' type [1]->[2], because it sends reflect.Struct instead of the correct slice type.

[1] https://github.com/gojek/merlin/blob/support-list-features/api/pkg/transformer/types/series/series.go#L60-L66
[2] https://github.com/gojek/merlin/blob/support-list-features/api/pkg/transformer/types/series/series.go#L238-L260

@tiopramayudi
Copy link
Collaborator

lgtm

@ariefrahmansyah ariefrahmansyah merged commit 0dc6cfe into main Feb 26, 2022
@ariefrahmansyah ariefrahmansyah deleted the support-list-features branch February 26, 2022 03:52
pradithya pushed a commit that referenced this pull request Oct 3, 2022
* Introducing list types for feast features

* Add feast list retrieval

* Add series's expression functions

E.g., flatten, unique, StdDev, mean, etc.

* Use github.com/gojekfarm/gota

* Address review: Add more test cases

* Address review: Assert mock feast on testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants