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

feat: Update the go feature server from Expedia code repo. #4665

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

shuchu
Copy link
Collaborator

@shuchu shuchu commented Oct 22, 2024

What this PR does / why we need it:

Update the improved Go feature server code from ExpediaGroup/Feast to our code repo.

Which issue(s) this PR fixes:

@shuchu
Copy link
Collaborator Author

shuchu commented Oct 22, 2024

cc: @EXPEbdodla

@shuchu shuchu changed the title feat: Update the go feature server from Expedia code repo. [WIP] feat: Update the go feature server from Expedia code repo. Oct 22, 2024
@shuchu shuchu force-pushed the feature/migrate-expedia-go-fs branch from 80285e6 to d371247 Compare October 23, 2024 02:43
@shuchu
Copy link
Collaborator Author

shuchu commented Oct 23, 2024

[Update 10-22-2024] Now it can compile, build and build docker image. All configures in the Makefile under the "#Go SDK & embedded" are working, except the "install-go-ci-dependencies".

The current "install-go-ci-dependencies" is obsoleted. We need to fix it when we setup the integration test for Go feature server.

!!Warning, the current version my not function correctly. need more testing and investigating.

@shuchu shuchu force-pushed the feature/migrate-expedia-go-fs branch from 9ee4605 to c5aaf98 Compare October 31, 2024 15:12
@shuchu
Copy link
Collaborator Author

shuchu commented Nov 1, 2024

[Update 10-31-2024]

  1. "make test-go" works now
  2. DataDog related observability instrumentation code were commented out but not removed. I keep these code and plan to use OTEL to replace them.

@shuchu shuchu changed the title [WIP] feat: Update the go feature server from Expedia code repo. feat: Update the go feature server from Expedia code repo. Nov 1, 2024
@shuchu shuchu marked this pull request as ready for review November 1, 2024 03:55
@shuchu shuchu requested a review from a team as a code owner November 1, 2024 03:55
@shuchu shuchu requested a review from HaoXuAI November 1, 2024 04:08
@@ -0,0 +1,212 @@
package registry
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be switched to remote registry. We built http registry to overcome the password sharing for SQL Registry. HTTP Registry which is FastAPI based is not contributed to Feast. We are also planning to leverage Remote registry and move over from HTTP one.

Copy link
Collaborator Author

@shuchu shuchu Nov 2, 2024

Choose a reason for hiding this comment

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

Thank you for the info, @EXPEbdodla ! Let me try to resolve this.

Copy link
Collaborator Author

@shuchu shuchu Nov 5, 2024

Choose a reason for hiding this comment

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

I have removed the code of HTTP Registry. And now, only the File based Registry is supported.

@shuchu
Copy link
Collaborator Author

shuchu commented Nov 5, 2024

[Update 11/04/2024]

  1. The HTTP Registry code is removed as it depends on an external HTTP server as @EXPEbdodla pointed out.
  2. The default Registry is File based one now.

}
sanitizedProjectName := strings.Replace(config.Project, "_", "-", -1)
productName := os.Getenv("PRODUCT")
endpoint := fmt.Sprintf("%s-transformations.%s.svc.cluster.local:80", sanitizedProjectName, productName)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is this an external Transformation server? I guess we need to remove this and related code? @EXPEbdodla

Copy link
Contributor

Choose a reason for hiding this comment

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

Initially transformations are running with GOPY bindings. That's not working at scale. So we implemented it similar to Java Feature Server.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you, @EXPEbdodla I guess I need to work on this part.

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 chose an "easy" fix for this. 😿

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. We should get the transformation server endpoint from feature_store.yaml.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated. :)

@shuchu shuchu marked this pull request as draft November 11, 2024 03:06
@shuchu shuchu force-pushed the feature/migrate-expedia-go-fs branch from b65a6a4 to 953d62e Compare November 21, 2024 04:31
@shuchu
Copy link
Collaborator Author

shuchu commented Nov 21, 2024

[Update 11-20-2024]
1, about the transformation service endpoint issue, I couldn't find a better solution now since this is a design choice between the "not working" callback function and using Python based transformation gRPC service. As for now, I use a general string to represent the endpoint. Sorry about this. I will spend more time to understand the code and see if we can do it in a better way.
cc: @EXPEbdodla @tokoko @franciscojavierarceo

@shuchu shuchu marked this pull request as ready for review November 21, 2024 04:43
@@ -297,6 +315,10 @@ func (fs *FeatureStore) readFromOnlineStore(ctx context.Context, entityRows []*p
requestedFeatureViewNames []string,
requestedFeatureNames []string,
) ([][]onlinestore.FeatureData, error) {
// Create a Datadog span from context
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think these can be removed or updated as datadog is not part of feast

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea. Datadog needs to be replaced with OTEL.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, I will replace them with OTEL after this PR get merged.

}
}
}

if t == redisNode {
// Metrics are not showing up when the service name is set to DD_SERVICE
Copy link
Collaborator

Choose a reason for hiding this comment

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

similar here

@@ -1,109 +1,12 @@
This directory contains the Go logic that's executed by the `EmbeddedOnlineFeatureServer` from Python.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason we are removing the document here?

Copy link
Contributor

Choose a reason for hiding this comment

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

That piece of code is not needed if we remove GOPY bindings.

…re.yaml file instead of OS env.

Signed-off-by: Shuchu Han <[email protected]>
@shuchu
Copy link
Collaborator Author

shuchu commented Nov 25, 2024

[Update 11/24/2024]

  1. use the feature_store.yaml file as the source of defining Python transformation service. Example:
# feature_store.yaml file
feature_store:
   transformation_service_endpoint: "localhost:50051"

@EXPEbdodla @feast-dev/reviewers-and-approvers

@shuchu shuchu requested review from EXPEbdodla and a team and removed request for EXPEbdodla November 26, 2024 01:36
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]

install-go-ci-dependencies:

Choose a reason for hiding this comment

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

this is all commented out, do we need it?

# go install golang.org/x/tools/cmd/goimports
# python -m pip install "pybindgen==0.22.1" "grpcio-tools>=1.56.2,<2" "mypy-protobuf>=3.1"

build-go: compile-protos-go

Choose a reason for hiding this comment

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

the inline seems to be at odds with the rest of the Makefile format, could you adjust it?

install-feast-ci-locally:
pip install -e ".[ci]"

test-go: compile-protos-go compile-protos-python install-feast-ci-locally

Choose a reason for hiding this comment

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

same here

format-go:
gofmt -s -w go/

lint-go: compile-protos-go

Choose a reason for hiding this comment

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

same here

@@ -161,13 +181,15 @@ func (fs *FeatureStore) GetOnlineFeatures(
result = append(result, vectors...)
}

if fs.transformationCallback != nil {
if fs.transformationCallback != nil || fs.transformationService != nil {

Choose a reason for hiding this comment

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

When we go to unify the transformations we'll have to update here too #4584

return featureViewIndices, indicesFeatureView, index
}

func (r *RedisOnlineStore) buildHsetKeys(featureViewNames []string, featureNames []string, indicesFeatureView map[int]string, index int) ([]string, []string) {

Choose a reason for hiding this comment

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

nit:

Suggested change
func (r *RedisOnlineStore) buildHsetKeys(featureViewNames []string, featureNames []string, indicesFeatureView map[int]string, index int) ([]string, []string) {
func (r *RedisOnlineStore) buildRedisHashSetKeys(featureViewNames []string, featureNames []string, indicesFeatureView map[int]string, index int) ([]string, []string) {

@@ -41,6 +41,7 @@ func NewSqliteOnlineStore(project string, repoConfig *registry.RepoConfig, onlin
return nil, fmt.Errorf("cannot find convert sqlite path to string %s", db_path)
} else {
store.path = fmt.Sprintf("%s/%s", repoConfig.RepoPath, dbPathStr)

Choose a reason for hiding this comment

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

was this just a lint format change?

registryStoreType := registryConfig.RegistryStoreType
registryPath := registryConfig.Path
r := &Registry{
cachedRegistryProtoTtl: time.Duration(registryConfig.CacheTtlSeconds),
project: project,
cachedRegistryProtoTtl: time.Duration(registryConfig.CacheTtlSeconds) * time.Second,

Choose a reason for hiding this comment

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

This seems like a pretty large change in time proportional to the number of seconds, no? Was this on purpose?

@@ -91,103 +99,6 @@ func ReleaseArrowContext(requestContextArrow map[string]arrow.Array) {
}
}

func CallTransformations(

Choose a reason for hiding this comment

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

rip

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.

4 participants