Skip to content

Commit

Permalink
try reading bytestream differently; remove debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
William Parsley committed Dec 13, 2023
1 parent 948c70e commit ff2a9b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
17 changes: 0 additions & 17 deletions go/internal/feast/featurestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,23 +175,6 @@ func (fs *FeatureStore) GetOnlineFeatures(
result = append(result, vectors...)
}

for i, arr := range result {
fmt.Println(i)
switch col := arr.Values.(type) {
case *array.Int64:
fmt.Println(col.Int64Values())
case *array.Int32:
fmt.Println(col.Int32Values())
case *array.String:
fmt.Println(col.String())
case *array.Float32:
fmt.Println(col.Float32Values())
case *array.Float64:
fmt.Println(col.Float64Values())
}
}


if fs.transformationCallback != nil || fs.transformationService != nil {
onDemandFeatures, err := transformation.AugmentResponseWithOnDemandTransforms(
ctx,
Expand Down
8 changes: 2 additions & 6 deletions go/internal/feast/transformation/transformation_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,10 @@ func (s *GrpcTransformationService) GetTransformation(

inputFields := make([]arrow.Field, 0)
inputColumns := make([]arrow.Array, 0)
fmt.Println("Printing retrieved features")
for name, arr := range retrievedFeatures {
inputFields = append(inputFields, arrow.Field{Name: name, Type: arr.DataType()})
inputColumns = append(inputColumns, arr)
}
fmt.Println("Printing request features")
for name, arr := range requestContext {
inputFields = append(inputFields, arrow.Field{Name: name, Type: arr.DataType()})
inputColumns = append(inputColumns, arr)
Expand Down Expand Up @@ -97,7 +95,6 @@ func (s *GrpcTransformationService) GetTransformation(

res, err := (*s.client).TransformFeatures(ctx, &req)
if err != nil {
fmt.Println("Error calling over the network to get transformations")
return nil, err
}

Expand All @@ -111,15 +108,14 @@ func ExtractTransformationResponse(
numRows int,
fullFeatureNames bool,
) ([]*onlineserving.FeatureVector, error) {
reader := bytes.NewReader(arrowBytes)
arrowMemory := memory.NewGoAllocator()
arrowReader, err := ipc.NewFileReader(reader, ipc.WithAllocator(arrowMemory))
arrowReader, err := ipc.NewFileReader(bytes.NewReader(arrowBytes), ipc.WithAllocator(arrowMemory))
if err != nil {
fmt.Println("Error allocating NewFileReader (ExtractTransformationResponse)")
return nil, err
}

outRecord, err := arrowReader.Record(numRows)
outRecord, err := arrowReader.Read()
if err != nil {
fmt.Println("Error reading arrow record (ExtractTransformationResponse)")
return nil, err
Expand Down

0 comments on commit ff2a9b0

Please sign in to comment.