Skip to content

Conversation

pyalex
Copy link
Collaborator

@pyalex pyalex commented Mar 21, 2022

What this PR does / why we need it:

Converts Go-based implementation of get online features functionality into library which will be embedded into Python code and called directly from Python SDK (w/o GRPC in the middle). This allows us to also use Python functions as callbacks to call some implementations (like online/offline store connectors) from Go feature server.

Which issue(s) this PR fixes:

Fixes #

@pyalex pyalex requested a review from a team as a code owner March 21, 2022 22:57
@pyalex pyalex requested review from achals and removed request for a team March 21, 2022 22:57
@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2022

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 93.50649% with 5 lines in your changes missing coverage. Please review.

Project coverage is 84.73%. Comparing base (ea6a9b2) to head (5f97c4b).
Report is 1409 commits behind head on master.

Files with missing lines Patch % Lines
...ython/feast/embedded_go/online_features_service.py 95.08% 3 Missing ⚠️
sdk/python/feast/feature_store.py 85.71% 1 Missing ⚠️
.../integration/online_store/test_universal_online.py 88.88% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2429      +/-   ##
==========================================
+ Coverage   83.66%   84.73%   +1.06%     
==========================================
  Files         125      126       +1     
  Lines       10838    10811      -27     
==========================================
+ Hits         9068     9161      +93     
+ Misses       1770     1650     -120     
Flag Coverage Δ
integrationtests 74.73% <93.50%> (+1.45%) ⬆️
unittests 58.39% <25.00%> (+0.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@felixwang9817 felixwang9817 left a comment

Choose a reason for hiding this comment

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

@pyalex some preliminary comments; will continue reviewing

@pyalex pyalex force-pushed the embedded-go branch 2 times, most recently from 1231226 to 301abe6 Compare March 22, 2022 22:48
Copy link
Collaborator

@felixwang9817 felixwang9817 left a comment

Choose a reason for hiding this comment

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

more comments, will continue looking

Copy link
Collaborator

@felixwang9817 felixwang9817 left a comment

Choose a reason for hiding this comment

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

more comments

Copy link
Member

Choose a reason for hiding this comment

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

Isn't this called immediately since we're returning in the next line? What's the value of deferring it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed

Comment on lines 50 to 71
Copy link
Member

Choose a reason for hiding this comment

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

Some comments here 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.

Added

pyalex added 4 commits March 23, 2022 15:22
Signed-off-by: pyalex <[email protected]>
Signed-off-by: pyalex <[email protected]>
@pyalex
Copy link
Collaborator Author

pyalex commented Mar 23, 2022

@achals @felixwang9817 Addressed your comments.

Copy link
Collaborator

@felixwang9817 felixwang9817 left a comment

Choose a reason for hiding this comment

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

I'm comfortable with merging in this PR now; I'll let @achals have the final say

thanks @pyalex for addressing my comments!

Copy link
Member

@achals achals left a comment

Choose a reason for hiding this comment

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

looks mostly fine, but the biggest piece is the featurestore.go file which I don't think I have confidence that I've reviewed thoroughly. I'll take a pass over that tomorrow morning.

Makefile Outdated
go mod tidy
go build -o ${ROOT_DIR}/sdk/python/feast/binaries/server github.com/feast-dev/feast/go/cmd/server
compile-go-lib: install-go-proto-dependencies install-go-ci-dependencies
python -m install pybindgen
Copy link
Member

Choose a reason for hiding this comment

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

should this be python -m pip install pybindgen? And should we pin the version of pybindgen?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is embarrassing) fixed

pyalex added 2 commits March 24, 2022 10:54
Signed-off-by: pyalex <[email protected]>
Signed-off-by: pyalex <[email protected]>
currentVector.Values = builder.NewArray()
} else {
currentVector.Values = array.NewNull(numRows)
arrowValues, err := utils.ProtoValuesToArrowArray(protoValues, arrowAllocator, numRows)
Copy link
Member

Choose a reason for hiding this comment

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

nit, can we have a different module name instead of utils? Seems like it'll become a kitchen sink..

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

renamed into types since it's type utils

Copy link
Member

@achals achals left a comment

Choose a reason for hiding this comment

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

/lgtm

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

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

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 removed the lgtm label Mar 24, 2022
Signed-off-by: pyalex <[email protected]>
@achals
Copy link
Member

achals commented Mar 24, 2022

/lgtm

@feast-ci-bot feast-ci-bot merged commit 0fbc062 into feast-dev:master Mar 24, 2022
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.

7 participants