Skip to content

Commit

Permalink
fix: Use a general string to represent the transformation service end…
Browse files Browse the repository at this point in the history
…point.

Signed-off-by: Shuchu Han <shuchu.han@gmail.com>
  • Loading branch information
shuchu committed Nov 21, 2024
1 parent 4eaa6c7 commit 953d62e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions go/internal/feast/featurestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ package feast
import (
"context"
"errors"
"fmt"
"os"
"strings"

"github.com/apache/arrow/go/v17/arrow/memory"
//"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
Expand Down Expand Up @@ -62,10 +60,12 @@ func NewFeatureStore(config *registry.RepoConfig, callback transformation.Transf
if err != nil {
return nil, err
}
sanitizedProjectName := strings.Replace(config.Project, "_", "-", -1)
productName := os.Getenv("PRODUCT")
endpoint := fmt.Sprintf("%s-transformations.%s.svc.cluster.local:80", sanitizedProjectName, productName)
transformationService, _ := transformation.NewGrpcTransformationService(config, endpoint)

// Use a scalable transformation service like Python Transformation Service as the Python version of transformation service is
// better for data calculation than the Go version
transformationServerEndpoint := os.Getenv("TRANSFORM_SERVER_ENDPOINT")

transformationService, _ := transformation.NewGrpcTransformationService(config, transformationServerEndpoint)

return &FeatureStore{
config: config,
Expand Down
8 changes: 4 additions & 4 deletions go/internal/feast/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (

var REGISTRY_SCHEMA_VERSION string = "1"
var REGISTRY_STORE_CLASS_FOR_SCHEME map[string]string = map[string]string{
"gs": "GCSRegistryStore",
"s3": "S3RegistryStore",
"file": "FileRegistryStore",
"": "FileRegistryStore",
"gs": "GCSRegistryStore",
"s3": "S3RegistryStore",
"file": "FileRegistryStore",
"": "FileRegistryStore",
}

/*
Expand Down
2 changes: 1 addition & 1 deletion go/internal/feast/server/server_commons.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ func LogWithSpanContext(span tracer.Span) zerolog.Logger {
return logger
}
*/
*/
2 changes: 2 additions & 0 deletions go/internal/feast/transformation/transformation.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ TransformationCallback is a Python callback function's expected signature.
The function should accept name of the on demand feature view and pointers to input & output record batches.
Each record batch is being passed as two pointers: pointer to array (data) and pointer to schema.
Python function is expected to return number of rows added to the output record batch.
[11-20-2024] Use a Transformation GRPC service, like the Python version one, for better scalability.
*/
type TransformationCallback func(ODFVName string, inputArrPtr, inputSchemaPtr, outArrPtr, outSchemaPtr uintptr, fullFeatureNames bool) int

Expand Down
1 change: 0 additions & 1 deletion go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/health"
"google.golang.org/grpc/health/grpc_health_v1"

//grpctrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/grpc"
//"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
)
Expand Down

0 comments on commit 953d62e

Please sign in to comment.