transformation

package
v0.22.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AugmentResponseWithOnDemandTransforms

func AugmentResponseWithOnDemandTransforms(
	onDemandFeatureViews []*model.OnDemandFeatureView,
	requestData map[string]*prototypes.RepeatedValue,
	entityRows map[string]*prototypes.RepeatedValue,
	features []*onlineserving.FeatureVector,
	transformationCallback TransformationCallback,
	arrowMemory memory.Allocator,
	numRows int,
	fullFeatureNames bool,

) ([]*onlineserving.FeatureVector, error)

func CallTransformations

func CallTransformations(
	featureView *model.OnDemandFeatureView,
	retrievedFeatures map[string]arrow.Array,
	requestContext map[string]arrow.Array,
	callback TransformationCallback,
	numRows int,
	fullFeatureNames bool,
) ([]*onlineserving.FeatureVector, error)

func EnsureRequestedDataExist

func EnsureRequestedDataExist(requestedOnDemandFeatureViews []*model.OnDemandFeatureView,
	requestDataFeatures map[string]*prototypes.RepeatedValue) error

Types

type TransformationCallback

type TransformationCallback func(ODFVName string, inputArrPtr, inputSchemaPtr, outArrPtr, outSchemaPtr uintptr, fullFeatureNames bool) int

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL